#
# This file is a part of the open-eBackup project.
# This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
# If a copy of the MPL was not distributed with this file, You can obtain one at
# http://mozilla.org/MPL/2.0/.
#
# Copyright (c) [2024] Huawei Technologies Co.,Ltd.
#
# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
# EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
# MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
#
# -*- coding: UTF-8 -*-

class ResourceApiWrapper:
    def __init__(self, apigateway, resourcegroup, organization, region, ak, sk, timeout=3000, verify="",
                 proxy="", sdksource="ghca"):
        self._apigateway = apigateway
        self._resourcegroup = resourcegroup
        self._organization = organization
        self._region = region
        self._ak = ak
        self._sk = sk
        self._timeout = timeout
        self._verify = verify
        self._sdksource = sdksource
        self._attach = False
        self._delete_disk = False
        self._delete_snapshot = False
        self._stop_instance = False



    def connect_check(self):
        result = "{\"Headers\":\"\",\"StatusCode\":200,\"Body\":{\"RequestId\":\"38EC7366-F5A9-46B1-BDB1-0FDC2E296397\",\"Regions\":{\"Region\":[{\"RegionId\":\"cn-qingdao-et2-b01\",\"RegionEndpoint\":\"ecs.aliyuncs.com\",\"LocalName\":\"qingdao\"},{\"RegionId\":\"cn-qingdao-nebula\",\"RegionEndpoint\":\"ecs.cn-qingdao-nebula.aliyuncs.com\",\"LocalName\":\"cn-qingdao-nebula\"}]}}}"
        return result

    def list_regions(self, **kwargs):
        region = "{\"RequestId\":\"38EC7366-F5A9-46B1-BDB1-0FDC2E296397\",\"Regions\":{\"Region\":[{\"RegionId\":\"cn-qingdao-et2-b01\",\"RegionEndpoint\":\"ecs.example.com\",\"LocalName\":\"China (Qingdao)$%^&*\"},{\"RegionId\":\"cn-qingdao-nebula\",\"RegionEndpoint\":\"ecs.cn-qingdao-nebula.example.com\",\"LocalName\":\"cn-qingdao-nebula$%^&*\"}]}}"
        return region

    def list_zones(self, regionId, id, **kwargs):
        zone = ""
        if regionId == "cn-qingdao-nebula":
            zone = "{\"RequestId\":\"473469C7-AA6F-4DC5-B3DB-A3DC0DE*****\",\"Zones\":{\"Zone\":[{\"AvailableDiskCategories\":{\"DiskCategories\":[\"cloud\"]},\"AvailableResourceCreation\":{\"ResourceTypes\":[\"Instance\",\"Disk\"]},\"LocalName\":\"华东 1 可用区 M%^&*\",\"ZoneId\":\"cn-qingdao-007-amtest11001-b\"},{\"AvailableDiskCategories\":{\"DiskCategories\":[\"cloud\"]},\"AvailableResourceCreation\":{\"ResourceTypes\":[\"Instance\",\"Disk\"]},\"LocalName\":\"华东 1 可用区 S\",\"ZoneId\":\"cn-qingdao-ae86-amtest11001-a\"}]}}"
        elif regionId == "cn-qingdao-et2-b01":
            zone = "{\"RequestId\":\"473469C7-AA6F-4DC5-B3DB-A3DC0DE*****\",\"Zones\":{\"Zone\":[{\"AvailableDiskCategories\":{\"DiskCategories\":[\"cloud\"]},\"AvailableResourceCreation\":{\"ResourceTypes\":[\"Instance\",\"Disk\"]},\"LocalName\":\"华东 1 可用区 G\",\"ZoneId\":\"cn-qingdao-toyota-amtest11001-b\"}]}}"
        return zone


    def list_instances(self, regionId, PageNumber=1, PageSize=100, instance_id="", **kwargs):
        ins = "{\"PageNumber\":1,\"TotalCount\":2,\"PageSize\":10,\"RequestId\":\"97935DF1-0289-4AA2-9DD1-72377838B16B\",\"Instances\":{\"Instance\":[{\"ImageId\":\"centos_7_06_64_20G_alibase_20190711.vhd\",\"VlanId\":\"\",\"EipAddress\":{\"IpAddress\":\"\",\"AllocationId\":\"\"},\"ZoneId\":\"cn-qingdao-toyota-amtest11001-b\",\"IoOptimized\":true,\"SerialNumber\":\"51d1353b-22bf-4567-a176-8b3e12e43***\",\"Cpu\":2,\"Memory\":8192,\"DeviceAvailable\":true,\"SecurityGroupIds\":{\"SecurityGroupId\":[\"sg-bp17zljqpohu6j2i****\"]},\"SaleCycle\":\"\",\"AutoReleaseTime\":\"\",\"ResourceGroupId\":\"123123\",\"ResourceGroupName\":\"ResourceSet(POC_123123)\",\"OSType\":\"linux\",\"OSName\":\"CentOS 7.6 64\\u4f4d\",\"InstanceNetworkType\":\"classic\",\"HostName\":\"iZbp1j4i2jdf3owlheb\",\"CreationTime\":\"2019-11-11T08:35Z\",\"Tags\":{\"Tag\":[{\"TagValue\":\"asg-bp1d8uuut40f4qc4****\",\"TagKey\":\"acs:autoscaling:scalingGroupId\"},{\"TagValue\":\"ESS\",\"TagKey\":\"ESS\"}]},\"EcsCapacityReservationAttr\":{\"CapacityReservationPreference\":\"none\",\"CapacityReservationId\":\"\"},\"RegionId\":\"cn-qingdao-nebula\",\"DeletionProtection\":false,\"OperationLocks\":{\"LockReason\":[]},\"ExpiredTime\":\"2099-12-31T15:59Z\",\"CpuOptions\":{\"Numa\":\"\",\"ThreadsPerCore\":2,\"CoreCount\":1},\"InnerIpAddress\":{\"IpAddress\":[\"10.80.61.42\"]},\"InstanceTypeFamily\":\"ecs.mn4\",\"InstanceId\":\"i-bp1jyxrChangewlhe566\",\"InternetMaxBandwidthIn\":50,\"CreditSpecification\":\"\",\"InternetChargeType\":\"PayByTraffic\",\"SpotStrategy\":\"NoSpot\",\"StoppedMode\":\"Not-applicable\",\"InternetMaxBandwidthOut\":1,\"VpcAttributes\":{\"NatIpAddress\":\"\",\"PrivateIpAddress\":{\"IpAddress\":[]},\"VSwitchId\":\"\",\"VpcId\":\"\"},\"SpotPriceLimit\":0,\"StartTime\":\"2019-11-11T08:35Z\",\"InstanceName\":\"ECS-asg-MyFirstScalingGroup566-911-auto%^&*\",\"Description\":\"ECS\",\"OSNameEn\":\"CentOS 7.6 64 bit\",\"PublicIpAddress\":{\"IpAddress\":[\"121.40.77.XXX\"]},\"InstanceType\":\"ecs.mn4.large\",\"Status\":\"Running\",\"MetadataOptions\":{\"HttpTokens\":\"\",\"HttpEndpoint\":\"\"},\"Recyclable\":false,\"ClusterId\":\"\",\"GPUSpec\":\"\",\"InstanceChargeType\":\"PostPaid\",\"GPUAmount\":0,\"DedicatedHostAttribute\":{\"DedicatedHostId\":\"\",\"DedicatedHostName\":\"\"},\"DedicatedInstanceAttribute\":{\"Affinity\":\"\",\"Tenancy\":\"\"},\"DeploymentSetId\":\"\",\"NetworkInterfaces\":{\"NetworkInterface\":[{\"Type\":\"Primary\",\"PrimaryIpAddress\":\"172.16.28.153\",\"NetworkInterfaceId\":\"eni-a4c01ip1467zzsdj64z9\",\"MacAddress\":\"00:16:3e:01:0b:c3\",\"PrivateIpSets\":{\"PrivateIpSet\":[{\"PrivateIpAddress\":\"172.16.28.153\",\"Primary\":true}]}}]}},{\"ImageId\":\"centos_7_06_64_20G_alibase_20190711.vhd\",\"VlanId\":\"\",\"EipAddress\":{\"IpAddress\":\"\",\"AllocationId\":\"\"},\"ZoneId\":\"cn-qingdao-toyota-amtest11001-b\",\"IoOptimized\":true,\"SerialNumber\":\"51d1353b-22bf-4567-a176-8b3e12e43***\",\"Cpu\":2,\"Memory\":8192,\"DeviceAvailable\":true,\"SecurityGroupIds\":{\"SecurityGroupId\":[\"sg-bp17zljqpohu6j2i****\"]},\"SaleCycle\":\"\",\"AutoReleaseTime\":\"\",\"ResourceGroupId\":\"1234556\",\"ResourceGroupName\":\"ResourceSet(POC_111)\",\"OSType\":\"linux\",\"OSName\":\"CentOS 7.6 64\\u4f4d\",\"InstanceNetworkType\":\"classic\",\"HostName\":\"iZbp1j4i2jdf3owlheb\",\"CreationTime\":\"2019-11-11T08:35Z\",\"Tags\":{\"Tag\":[{\"TagValue\":\"asg-bp1d8uuut40f4qc4****\",\"TagKey\":\"acs:autoscaling:scalingGroupId\"},{\"TagValue\":\"ESS\",\"TagKey\":\"ESS\"}]},\"EcsCapacityReservationAttr\":{\"CapacityReservationPreference\":\"none\",\"CapacityReservationId\":\"\"},\"RegionId\":\"cn-qingdao-nebula\",\"DeletionProtection\":false,\"OperationLocks\":{\"LockReason\":[]},\"ExpiredTime\":\"2099-12-31T15:59Z\",\"CpuOptions\":{\"Numa\":\"\",\"ThreadsPerCore\":2,\"CoreCount\":1},\"InnerIpAddress\":{\"IpAddress\":[\"10.80.61.42\"]},\"InstanceTypeFamily\":\"ecs.mn4\",\"InstanceId\":\"i-bp1j4i2jdf3owlhe1111321\",\"InternetMaxBandwidthIn\":50,\"CreditSpecification\":\"\",\"InternetChargeType\":\"PayByTraffic\",\"SpotStrategy\":\"NoSpot\",\"StoppedMode\":\"Not-applicable\",\"InternetMaxBandwidthOut\":1,\"VpcAttributes\":{\"NatIpAddress\":\"\",\"PrivateIpAddress\":{\"IpAddress\":[]},\"VSwitchId\":\"\",\"VpcId\":\"\"},\"SpotPriceLimit\":0,\"StartTime\":\"2019-11-11T08:35Z\",\"InstanceName\":\"ECS-asg-MyFirstScalingGroup$%^&*\",\"Description\":\"ECS\",\"OSNameEn\":\"CentOS 7.6 64 bit\",\"PublicIpAddress\":{\"IpAddress\":[\"121.40.77.XXX\"]},\"InstanceType\":\"ecs.mn4.large\",\"Status\":\"Running\",\"MetadataOptions\":{\"HttpTokens\":\"\",\"HttpEndpoint\":\"\"},\"Recyclable\":false,\"ClusterId\":\"\",\"GPUSpec\":\"\",\"InstanceChargeType\":\"PostPaid\",\"GPUAmount\":0,\"DedicatedHostAttribute\":{\"DedicatedHostId\":\"\",\"DedicatedHostName\":\"\"},\"DedicatedInstanceAttribute\":{\"Affinity\":\"\",\"Tenancy\":\"\"},\"DeploymentSetId\":\"\",\"NetworkInterfaces\":{\"NetworkInterface\":[{\"Type\":\"Primary\",\"PrimaryIpAddress\":\"172.16.28.153\",\"NetworkInterfaceId\":\"eni-a4c01ip1467zzsdj64z9\",\"MacAddress\":\"00:16:3e:01:0b:c3\",\"PrivateIpSets\":{\"PrivateIpSet\":[{\"PrivateIpAddress\":\"172.16.28.153\",\"Primary\":true}]}}]}}]}}"
        if instance_id == "i-bp1jyxrChangewlhe566":
            ins = "{\"PageNumber\":1,\"TotalCount\":1,\"PageSize\":10,\"RequestId\":\"97935DF1-0289-4AA2-9DD1-72377838B16B\",\"Instances\":{\"Instance\":[{\"ImageId\":\"centos_7_06_64_20G_alibase_20190711.vhd\",\"VlanId\":\"\",\"EipAddress\":{\"IpAddress\":\"\",\"AllocationId\":\"\"},\"ZoneId\":\"cn-qingdao-toyota-amtest11001-b\",\"IoOptimized\":true,\"SerialNumber\":\"51d1353b-22bf-4567-a176-8b3e12e43***\",\"Cpu\":2,\"Memory\":8192,\"DeviceAvailable\":true,\"SecurityGroupIds\":{\"SecurityGroupId\":[\"sg-bp17zljqpohu6j2i****\"]},\"SaleCycle\":\"\",\"AutoReleaseTime\":\"\",\"ResourceGroupId\":\"123123\",\"ResourceGroupName\":\"ResourceSet(POC_123123)\",\"OSType\":\"linux\",\"OSName\":\"CentOS 7.6 64\\u4f4d\",\"InstanceNetworkType\":\"classic\",\"HostName\":\"iZbp1j4i2jdf3owlheb\",\"CreationTime\":\"2019-11-11T08:35Z\",\"Tags\":{\"Tag\":[{\"TagValue\":\"asg-bp1d8uuut40f4qc4****\",\"TagKey\":\"acs:autoscaling:scalingGroupId\"},{\"TagValue\":\"ESS\",\"TagKey\":\"ESS\"}]},\"EcsCapacityReservationAttr\":{\"CapacityReservationPreference\":\"none\",\"CapacityReservationId\":\"\"},\"RegionId\":\"cn-qingdao-nebula\",\"DeletionProtection\":false,\"OperationLocks\":{\"LockReason\":[]},\"ExpiredTime\":\"2099-12-31T15:59Z\",\"CpuOptions\":{\"Numa\":\"\",\"ThreadsPerCore\":2,\"CoreCount\":1},\"InnerIpAddress\":{\"IpAddress\":[\"10.80.61.42\"]},\"InstanceTypeFamily\":\"ecs.mn4\",\"InstanceId\":\"i-bp1jyxrChangewlhe566\",\"InternetMaxBandwidthIn\":50,\"CreditSpecification\":\"\",\"InternetChargeType\":\"PayByTraffic\",\"SpotStrategy\":\"NoSpot\",\"StoppedMode\":\"Not-applicable\",\"InternetMaxBandwidthOut\":1,\"VpcAttributes\":{\"NatIpAddress\":\"\",\"PrivateIpAddress\":{\"IpAddress\":[]},\"VSwitchId\":\"\",\"VpcId\":\"\"},\"SpotPriceLimit\":0,\"StartTime\":\"2019-11-11T08:35Z\",\"InstanceName\":\"ECS-asg-MyFirstScalingGroup566-911-auto%^&*\",\"Description\":\"ECS\",\"OSNameEn\":\"CentOS 7.6 64 bit\",\"PublicIpAddress\":{\"IpAddress\":[\"121.40.77.XXX\"]},\"InstanceType\":\"ecs.mn4.large\",\"Status\":\"Running\",\"MetadataOptions\":{\"HttpTokens\":\"\",\"HttpEndpoint\":\"\"},\"Recyclable\":false,\"ClusterId\":\"\",\"GPUSpec\":\"\",\"InstanceChargeType\":\"PostPaid\",\"GPUAmount\":0,\"DedicatedHostAttribute\":{\"DedicatedHostId\":\"\",\"DedicatedHostName\":\"\"},\"DedicatedInstanceAttribute\":{\"Affinity\":\"\",\"Tenancy\":\"\"},\"DeploymentSetId\":\"\",\"NetworkInterfaces\":{\"NetworkInterface\":[{\"Type\":\"Primary\",\"PrimaryIpAddress\":\"172.16.28.153\",\"NetworkInterfaceId\":\"eni-a4c01ip1467zzsdj64z9\",\"MacAddress\":\"00:16:3e:01:0b:c3\",\"PrivateIpSets\":{\"PrivateIpSet\":[{\"PrivateIpAddress\":\"172.16.28.153\",\"Primary\":true}]}}]}}]}}"
            if self._stop_instance:
                ins = "{\"PageNumber\":1,\"TotalCount\":1,\"PageSize\":10,\"RequestId\":\"97935DF1-0289-4AA2-9DD1-72377838B16B\",\"Instances\":{\"Instance\":[{\"ImageId\":\"centos_7_06_64_20G_alibase_20190711.vhd\",\"VlanId\":\"\",\"EipAddress\":{\"IpAddress\":\"\",\"AllocationId\":\"\"},\"ZoneId\":\"cn-qingdao-toyota-amtest11001-b\",\"IoOptimized\":true,\"SerialNumber\":\"51d1353b-22bf-4567-a176-8b3e12e43***\",\"Cpu\":2,\"Memory\":8192,\"DeviceAvailable\":true,\"SecurityGroupIds\":{\"SecurityGroupId\":[\"sg-bp17zljqpohu6j2i****\"]},\"SaleCycle\":\"\",\"AutoReleaseTime\":\"\",\"ResourceGroupId\":\"123123\",\"ResourceGroupName\":\"ResourceSet(POC_123123)\",\"OSType\":\"linux\",\"OSName\":\"CentOS 7.6 64\\u4f4d\",\"InstanceNetworkType\":\"classic\",\"HostName\":\"iZbp1j4i2jdf3owlheb\",\"CreationTime\":\"2019-11-11T08:35Z\",\"Tags\":{\"Tag\":[{\"TagValue\":\"asg-bp1d8uuut40f4qc4****\",\"TagKey\":\"acs:autoscaling:scalingGroupId\"},{\"TagValue\":\"ESS\",\"TagKey\":\"ESS\"}]},\"EcsCapacityReservationAttr\":{\"CapacityReservationPreference\":\"none\",\"CapacityReservationId\":\"\"},\"RegionId\":\"cn-qingdao-nebula\",\"DeletionProtection\":false,\"OperationLocks\":{\"LockReason\":[]},\"ExpiredTime\":\"2099-12-31T15:59Z\",\"CpuOptions\":{\"Numa\":\"\",\"ThreadsPerCore\":2,\"CoreCount\":1},\"InnerIpAddress\":{\"IpAddress\":[\"10.80.61.42\"]},\"InstanceTypeFamily\":\"ecs.mn4\",\"InstanceId\":\"i-bp1jyxrChangewlhe566\",\"InternetMaxBandwidthIn\":50,\"CreditSpecification\":\"\",\"InternetChargeType\":\"PayByTraffic\",\"SpotStrategy\":\"NoSpot\",\"StoppedMode\":\"Not-applicable\",\"InternetMaxBandwidthOut\":1,\"VpcAttributes\":{\"NatIpAddress\":\"\",\"PrivateIpAddress\":{\"IpAddress\":[]},\"VSwitchId\":\"\",\"VpcId\":\"\"},\"SpotPriceLimit\":0,\"StartTime\":\"2019-11-11T08:35Z\",\"InstanceName\":\"ECS-asg-MyFirstScalingGroup566-911-auto%^&*\",\"Description\":\"ECS\",\"OSNameEn\":\"CentOS 7.6 64 bit\",\"PublicIpAddress\":{\"IpAddress\":[\"121.40.77.XXX\"]},\"InstanceType\":\"ecs.mn4.large\",\"Status\":\"Stopped\",\"MetadataOptions\":{\"HttpTokens\":\"\",\"HttpEndpoint\":\"\"},\"Recyclable\":false,\"ClusterId\":\"\",\"GPUSpec\":\"\",\"InstanceChargeType\":\"PostPaid\",\"GPUAmount\":0,\"DedicatedHostAttribute\":{\"DedicatedHostId\":\"\",\"DedicatedHostName\":\"\"},\"DedicatedInstanceAttribute\":{\"Affinity\":\"\",\"Tenancy\":\"\"},\"DeploymentSetId\":\"\",\"NetworkInterfaces\":{\"NetworkInterface\":[{\"Type\":\"Primary\",\"PrimaryIpAddress\":\"172.16.28.153\",\"NetworkInterfaceId\":\"eni-a4c01ip1467zzsdj64z9\",\"MacAddress\":\"00:16:3e:01:0b:c3\",\"PrivateIpSets\":{\"PrivateIpSet\":[{\"PrivateIpAddress\":\"172.16.28.153\",\"Primary\":true}]}}]}}]}}"
        elif instance_id == "i-bp1j4i2jdf3owlhe1111321":
            ins = "{\"PageNumber\":1,\"TotalCount\":1,\"PageSize\":10,\"RequestId\":\"97935DF1-0289-4AA2-9DD1-72377838B16B\",\"Instances\":{\"Instance\":[{\"ImageId\":\"centos_7_06_64_20G_alibase_20190711.vhd\",\"VlanId\":\"\",\"EipAddress\":{\"IpAddress\":\"\",\"AllocationId\":\"\"},\"ZoneId\":\"cn-qingdao-toyota-amtest11001-b\",\"IoOptimized\":true,\"SerialNumber\":\"51d1353b-22bf-4567-a176-8b3e12e43***\",\"Cpu\":2,\"Memory\":8192,\"DeviceAvailable\":true,\"SecurityGroupIds\":{\"SecurityGroupId\":[\"sg-bp17zljqpohu6j2i****\"]},\"SaleCycle\":\"\",\"AutoReleaseTime\":\"\",\"ResourceGroupId\":\"1234556\",\"ResourceGroupName\":\"ResourceSet(POC_111)\",\"OSType\":\"linux\",\"OSName\":\"CentOS 7.6 64\\u4f4d\",\"InstanceNetworkType\":\"classic\",\"HostName\":\"iZbp1j4i2jdf3owlheb\",\"CreationTime\":\"2019-11-11T08:35Z\",\"Tags\":{\"Tag\":[{\"TagValue\":\"asg-bp1d8uuut40f4qc4****\",\"TagKey\":\"acs:autoscaling:scalingGroupId\"},{\"TagValue\":\"ESS\",\"TagKey\":\"ESS\"}]},\"EcsCapacityReservationAttr\":{\"CapacityReservationPreference\":\"none\",\"CapacityReservationId\":\"\"},\"RegionId\":\"cn-qingdao-nebula\",\"DeletionProtection\":false,\"OperationLocks\":{\"LockReason\":[]},\"ExpiredTime\":\"2099-12-31T15:59Z\",\"CpuOptions\":{\"Numa\":\"\",\"ThreadsPerCore\":2,\"CoreCount\":1},\"InnerIpAddress\":{\"IpAddress\":[\"10.80.61.42\"]},\"InstanceTypeFamily\":\"ecs.mn4\",\"InstanceId\":\"i-bp1j4i2jdf3owlhe1111321\",\"InternetMaxBandwidthIn\":50,\"CreditSpecification\":\"\",\"InternetChargeType\":\"PayByTraffic\",\"SpotStrategy\":\"NoSpot\",\"StoppedMode\":\"Not-applicable\",\"InternetMaxBandwidthOut\":1,\"VpcAttributes\":{\"NatIpAddress\":\"\",\"PrivateIpAddress\":{\"IpAddress\":[]},\"VSwitchId\":\"\",\"VpcId\":\"\"},\"SpotPriceLimit\":0,\"StartTime\":\"2019-11-11T08:35Z\",\"InstanceName\":\"ECS-asg-MyFirstScalingGroup$%^&*\",\"Description\":\"ECS\",\"OSNameEn\":\"CentOS 7.6 64 bit\",\"PublicIpAddress\":{\"IpAddress\":[\"121.40.77.XXX\"]},\"InstanceType\":\"ecs.mn4.large\",\"Status\":\"Running\",\"MetadataOptions\":{\"HttpTokens\":\"\",\"HttpEndpoint\":\"\"},\"Recyclable\":false,\"ClusterId\":\"\",\"GPUSpec\":\"\",\"InstanceChargeType\":\"PostPaid\",\"GPUAmount\":0,\"DedicatedHostAttribute\":{\"DedicatedHostId\":\"\",\"DedicatedHostName\":\"\"},\"DedicatedInstanceAttribute\":{\"Affinity\":\"\",\"Tenancy\":\"\"},\"DeploymentSetId\":\"\",\"NetworkInterfaces\":{\"NetworkInterface\":[{\"Type\":\"Primary\",\"PrimaryIpAddress\":\"172.16.28.153\",\"NetworkInterfaceId\":\"eni-a4c01ip1467zzsdj64z9\",\"MacAddress\":\"00:16:3e:01:0b:c3\",\"PrivateIpSets\":{\"PrivateIpSet\":[{\"PrivateIpAddress\":\"172.16.28.153\",\"Primary\":true}]}}]}}]}}"
            if self._stop_instance:
                ins = "{\"PageNumber\":1,\"TotalCount\":1,\"PageSize\":10,\"RequestId\":\"97935DF1-0289-4AA2-9DD1-72377838B16B\",\"Instances\":{\"Instance\":[{\"ImageId\":\"centos_7_06_64_20G_alibase_20190711.vhd\",\"VlanId\":\"\",\"EipAddress\":{\"IpAddress\":\"\",\"AllocationId\":\"\"},\"ZoneId\":\"cn-qingdao-toyota-amtest11001-b\",\"IoOptimized\":true,\"SerialNumber\":\"51d1353b-22bf-4567-a176-8b3e12e43***\",\"Cpu\":2,\"Memory\":8192,\"DeviceAvailable\":true,\"SecurityGroupIds\":{\"SecurityGroupId\":[\"sg-bp17zljqpohu6j2i****\"]},\"SaleCycle\":\"\",\"AutoReleaseTime\":\"\",\"ResourceGroupId\":\"1234556\",\"ResourceGroupName\":\"ResourceSet(POC_111)\",\"OSType\":\"linux\",\"OSName\":\"CentOS 7.6 64\\u4f4d\",\"InstanceNetworkType\":\"classic\",\"HostName\":\"iZbp1j4i2jdf3owlheb\",\"CreationTime\":\"2019-11-11T08:35Z\",\"Tags\":{\"Tag\":[{\"TagValue\":\"asg-bp1d8uuut40f4qc4****\",\"TagKey\":\"acs:autoscaling:scalingGroupId\"},{\"TagValue\":\"ESS\",\"TagKey\":\"ESS\"}]},\"EcsCapacityReservationAttr\":{\"CapacityReservationPreference\":\"none\",\"CapacityReservationId\":\"\"},\"RegionId\":\"cn-qingdao-nebula\",\"DeletionProtection\":false,\"OperationLocks\":{\"LockReason\":[]},\"ExpiredTime\":\"2099-12-31T15:59Z\",\"CpuOptions\":{\"Numa\":\"\",\"ThreadsPerCore\":2,\"CoreCount\":1},\"InnerIpAddress\":{\"IpAddress\":[\"10.80.61.42\"]},\"InstanceTypeFamily\":\"ecs.mn4\",\"InstanceId\":\"i-bp1j4i2jdf3owlhe1111321\",\"InternetMaxBandwidthIn\":50,\"CreditSpecification\":\"\",\"InternetChargeType\":\"PayByTraffic\",\"SpotStrategy\":\"NoSpot\",\"StoppedMode\":\"Not-applicable\",\"InternetMaxBandwidthOut\":1,\"VpcAttributes\":{\"NatIpAddress\":\"\",\"PrivateIpAddress\":{\"IpAddress\":[]},\"VSwitchId\":\"\",\"VpcId\":\"\"},\"SpotPriceLimit\":0,\"StartTime\":\"2019-11-11T08:35Z\",\"InstanceName\":\"ECS-asg-MyFirstScalingGroup$%^&*\",\"Description\":\"ECS\",\"OSNameEn\":\"CentOS 7.6 64 bit\",\"PublicIpAddress\":{\"IpAddress\":[\"121.40.77.XXX\"]},\"InstanceType\":\"ecs.mn4.large\",\"Status\":\"Stopped\",\"MetadataOptions\":{\"HttpTokens\":\"\",\"HttpEndpoint\":\"\"},\"Recyclable\":false,\"ClusterId\":\"\",\"GPUSpec\":\"\",\"InstanceChargeType\":\"PostPaid\",\"GPUAmount\":0,\"DedicatedHostAttribute\":{\"DedicatedHostId\":\"\",\"DedicatedHostName\":\"\"},\"DedicatedInstanceAttribute\":{\"Affinity\":\"\",\"Tenancy\":\"\"},\"DeploymentSetId\":\"\",\"NetworkInterfaces\":{\"NetworkInterface\":[{\"Type\":\"Primary\",\"PrimaryIpAddress\":\"172.16.28.153\",\"NetworkInterfaceId\":\"eni-a4c01ip1467zzsdj64z9\",\"MacAddress\":\"00:16:3e:01:0b:c3\",\"PrivateIpSets\":{\"PrivateIpSet\":[{\"PrivateIpAddress\":\"172.16.28.153\",\"Primary\":true}]}}]}}]}}"

        return ins

    def list_disks(self, regionId, instance_id="", PageNumber=1, PageSize=100, disk_ids="", snapshot_id="", **kwargs):
        disk = ""
        if self._delete_disk:
            disk = "{\"NextToken\":\"AAAAAdDWBF2****\",\"PageSize\":10,\"PageNumber\":1,\"RequestId\":\"473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E\",\"TotalCount\":0,\"Disks\":{\"Disk\":[]}}"
            return disk

        if instance_id == "i-bp1jyxrChangewlhe566":
            disk = "{\"NextToken\":\"AAAAAdDWBF2****\",\"PageSize\":10,\"PageNumber\":1,\"RequestId\":\"473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E\",\"TotalCount\":3,\"Disks\":{\"Disk\":[{\"SerialNumber\":\"bp18um4r4f2fve2****\",\"CreationTime\":\"2021-06-07T06:08:54Z\",\"Status\":\"In_use\",\"Type\":\"data\",\"PerformanceLevel\":\"PL0\",\"BdfId\":\"null\",\"EnableAutoSnapshot\":false,\"StorageSetId\":\"ss-i-bp1j4i2jdf3owlhe****\",\"StorageSetPartitionNumber\":11,\"DiskId\":\"d-bp18um4r4f2fve24\",\"DeleteAutoSnapshot\":false,\"StorageClusterId\":\"dbsc-j5e1sf2vaf5he8m2****\",\"Encrypted\":false,\"IOPSRead\":2000,\"MountInstanceNum\":1,\"Description\":\"testDescription\",\"Device\":\"/dev/xvdb\",\"DiskName\":\"testDiskName1\",\"Portable\":true,\"ImageId\":\"m-bp13aqm171qynt3u***\",\"KMSKeyId\":\"0e478b7a-4262-4802-b8cb-00d3fb408***\",\"DeleteWithInstance\":true,\"DetachedTime\":\"2021-06-07T21:01:22Z\",\"SourceSnapshotId\":\"s-bp67acfmxazb4p****\",\"AutoSnapshotPolicyId\":\"sp-bp67acfmxazb4p****\",\"EnableAutomatedSnapshotPolicy\":false,\"IOPSWrite\":2000,\"InstanceId\":\"i-bp67acfmxazb4q****\",\"IOPS\":4000,\"RegionId\":\"cn-hangzhou\",\"ExpiredTime\":\"2021-07-07T16:00Z\",\"Size\":10,\"ResourceGroupId\":\"rg-bp67acfmxazb4p****\",\"DiskChargeType\":\"PrePaid\",\"ZoneId\":\"cn-hangzhou-i\",\"AttachedTime\":\"2021-06-07T06:08:56Z\",\"Category\":\"cloud_pperf\",\"ProductCode\":\"jxsc000204\",\"MultiAttach\":\"Disabled\",\"OperationLocks\":{\"OperationLock\":[{\"LockReason\":\"security\"}]},\"MountInstances\":{\"MountInstance\":[{\"AttachedTime\":\"2017-12-05T2340:00Z\",\"InstanceId\":\"i-bp1j4i2jdf3owlhe****\",\"Device\":\"/dev/xvda\"}]},\"Tags\":{\"Tag\":[{\"TagValue\":\"TestValue\",\"TagKey\":\"TestKey\"}]},\"Attachments\":{\"Attachment\":[{\"InstanceId\":\"i-bp67acfmxazb4q****\",\"Device\":\"/dev/xvda\",\"AttachedTime\":\"2021-06-07T06:08:56Z\"}]},\"ProvisionedIops\":40000,\"BurstingEnabled\":false,\"Throughput\":100,\"ThroughputRead\":100,\"ThroughputWrite\":100},{\"SerialNumber\":\"bp18um4r4f2fve2****\",\"CreationTime\":\"2021-06-07T06:08:54Z\",\"Status\":\"In_use\",\"Type\":\"data\",\"PerformanceLevel\":\"PL0\",\"BdfId\":\"null\",\"EnableAutoSnapshot\":false,\"StorageSetId\":\"ss-i-bp1j4i2jdf3owlhe****\",\"StorageSetPartitionNumber\":11,\"DiskId\":\"d-bp18um4r4f2fve24985\",\"DeleteAutoSnapshot\":false,\"StorageClusterId\":\"dbsc-j5e1sf2vaf5he8m2****\",\"Encrypted\":false,\"IOPSRead\":2000,\"MountInstanceNum\":1,\"Description\":\"testDescription\",\"Device\":\"/dev/xvdb\",\"DiskName\":\"testDiskName11\",\"Portable\":true,\"ImageId\":\"m-bp13aqm171qynt3u***\",\"KMSKeyId\":\"0e478b7a-4262-4802-b8cb-00d3fb408***\",\"DeleteWithInstance\":true,\"DetachedTime\":\"2021-06-07T21:01:22Z\",\"SourceSnapshotId\":\"s-bp67acfmxazb4p****\",\"AutoSnapshotPolicyId\":\"sp-bp67acfmxazb4p****\",\"EnableAutomatedSnapshotPolicy\":false,\"IOPSWrite\":2000,\"InstanceId\":\"i-bp67acfmxazb4q****\",\"IOPS\":4000,\"RegionId\":\"cn-hangzhou\",\"ExpiredTime\":\"2021-07-07T16:00Z\",\"Size\":10,\"ResourceGroupId\":\"rg-bp67acfmxazb4p****\",\"DiskChargeType\":\"PrePaid\",\"ZoneId\":\"cn-hangzhou-i\",\"AttachedTime\":\"2021-06-07T06:08:56Z\",\"Category\":\"cloud_sperf\",\"ProductCode\":\"jxsc000204\",\"MultiAttach\":\"Disabled\",\"OperationLocks\":{\"OperationLock\":[{\"LockReason\":\"security\"}]},\"MountInstances\":{\"MountInstance\":[{\"AttachedTime\":\"2017-12-05T2340:00Z\",\"InstanceId\":\"i-bp1j4i2jdf3owlhe****\",\"Device\":\"/dev/xvda\"}]},\"Tags\":{\"Tag\":[{\"TagValue\":\"TestValue\",\"TagKey\":\"TestKey\"}]},\"Attachments\":{\"Attachment\":[{\"InstanceId\":\"i-bp67acfmxazb4q****\",\"Device\":\"/dev/xvda\",\"AttachedTime\":\"2021-06-07T06:08:56Z\"}]},\"ProvisionedIops\":40000,\"BurstingEnabled\":false,\"Throughput\":100,\"ThroughputRead\":100,\"ThroughputWrite\":100},{\"SerialNumber\":\"bp18um4r4f2fve2****\",\"CreationTime\":\"2021-06-07T06:08:54Z\",\"Status\":\"In_use\",\"Type\":\"data\",\"PerformanceLevel\":\"PL0\",\"BdfId\":\"null\",\"EnableAutoSnapshot\":false,\"StorageSetId\":\"ss-i-bp1j4i2jdf3owlhe****\",\"StorageSetPartitionNumber\":11,\"DiskId\":\"d-bp18um4r4f2fve24100\",\"DeleteAutoSnapshot\":false,\"StorageClusterId\":\"dbsc-j5e1sf2vaf5he8m2****\",\"Encrypted\":false,\"IOPSRead\":2000,\"MountInstanceNum\":1,\"Description\":\"testDescription\",\"Device\":\"/dev/xvdb\",\"DiskName\":\"testDiskName12\",\"Portable\":true,\"ImageId\":\"m-bp13aqm171qynt3u***\",\"KMSKeyId\":\"0e478b7a-4262-4802-b8cb-00d3fb408***\",\"DeleteWithInstance\":true,\"DetachedTime\":\"2021-06-07T21:01:22Z\",\"SourceSnapshotId\":\"s-bp67acfmxazb4p****\",\"AutoSnapshotPolicyId\":\"sp-bp67acfmxazb4p****\",\"EnableAutomatedSnapshotPolicy\":false,\"IOPSWrite\":2000,\"InstanceId\":\"i-bp67acfmxazb4q****\",\"IOPS\":4000,\"RegionId\":\"cn-hangzhou\",\"ExpiredTime\":\"2021-07-07T16:00Z\",\"Size\":20,\"ResourceGroupId\":\"rg-bp67acfmxazb4p****\",\"DiskChargeType\":\"PrePaid\",\"ZoneId\":\"cn-hangzhou-i\",\"AttachedTime\":\"2021-06-07T06:08:56Z\",\"Category\":\"cloud_pperf\",\"ProductCode\":\"jxsc000204\",\"MultiAttach\":\"Disabled\",\"OperationLocks\":{\"OperationLock\":[{\"LockReason\":\"security\"}]},\"MountInstances\":{\"MountInstance\":[{\"AttachedTime\":\"2017-12-05T2340:00Z\",\"InstanceId\":\"i-bp1j4i2jdf3owlhe****\",\"Device\":\"/dev/xvda\"}]},\"Tags\":{\"Tag\":[{\"TagValue\":\"TestValue\",\"TagKey\":\"TestKey\"}]},\"Attachments\":{\"Attachment\":[{\"InstanceId\":\"i-bp67acfmxazb4q****\",\"Device\":\"/dev/xvda\",\"AttachedTime\":\"2021-06-07T06:08:56Z\"}]},\"ProvisionedIops\":40000,\"BurstingEnabled\":false,\"Throughput\":100,\"ThroughputRead\":100,\"ThroughputWrite\":100}]}}"
        elif instance_id == "i-bp1j4i2jdf3owlhe1111321":
            disk =  "{\"NextToken\":\"AAAAAdDWBF2****\",\"PageSize\":10,\"PageNumber\":1,\"RequestId\":\"473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E\",\"TotalCount\":2,\"Disks\":{\"Disk\":[{\"SerialNumber\":\"bp18um4r4f2fve2****\",\"CreationTime\":\"2021-06-07T06:08:54Z\",\"Status\":\"In_use\",\"Type\":\"system\",\"PerformanceLevel\":\"PL0\",\"BdfId\":\"null\",\"EnableAutoSnapshot\":false,\"StorageSetId\":\"ss-i-bp1j4i2jdf3owlhe****\",\"StorageSetPartitionNumber\":11,\"DiskId\":\"d-bp18um4r4f2fve25\",\"DeleteAutoSnapshot\":false,\"StorageClusterId\":\"dbsc-j5e1sf2vaf5he8m2****\",\"Encrypted\":false,\"IOPSRead\":2000,\"MountInstanceNum\":1,\"Description\":\"testDescription\",\"Device\":\"/dev/xvdb\",\"DiskName\":\"testDiskName2\",\"Portable\":true,\"ImageId\":\"m-bp13aqm171qynt3u***\",\"KMSKeyId\":\"0e478b7a-4262-4802-b8cb-00d3fb408***\",\"DeleteWithInstance\":true,\"DetachedTime\":\"2021-06-07T21:01:22Z\",\"SourceSnapshotId\":\"s-bp67acfmxazb4p****\",\"AutoSnapshotPolicyId\":\"sp-bp67acfmxazb4p****\",\"EnableAutomatedSnapshotPolicy\":false,\"IOPSWrite\":2000,\"InstanceId\":\"i-bp67acfmxazb4q****\",\"IOPS\":4000,\"RegionId\":\"cn-hangzhou\",\"ExpiredTime\":\"2021-07-07T16:00Z\",\"Size\":10,\"ResourceGroupId\":\"rg-bp67acfmxazb4p****\",\"DiskChargeType\":\"PrePaid\",\"ZoneId\":\"cn-hangzhou-i\",\"AttachedTime\":\"2021-06-07T06:08:56Z\",\"Category\":\"cloud_pperf\",\"ProductCode\":\"jxsc000204\",\"MultiAttach\":\"Disabled\",\"OperationLocks\":{\"OperationLock\":[{\"LockReason\":\"security\"}]},\"MountInstances\":{\"MountInstance\":[{\"AttachedTime\":\"2017-12-05T2340:00Z\",\"InstanceId\":\"i-bp1j4i2jdf3owlhe****\",\"Device\":\"/dev/xvda\"}]},\"Tags\":{\"Tag\":[{\"TagValue\":\"TestValue\",\"TagKey\":\"TestKey\"}]},\"Attachments\":{\"Attachment\":[{\"InstanceId\":\"i-bp67acfmxazb4q****\",\"Device\":\"/dev/xvda\",\"AttachedTime\":\"2021-06-07T06:08:56Z\"}]},\"ProvisionedIops\":40000,\"BurstingEnabled\":false,\"Throughput\":100,\"ThroughputRead\":100,\"ThroughputWrite\":100},{\"SerialNumber\":\"bp18um4r4f2fve2****\",\"CreationTime\":\"2021-06-07T06:08:54Z\",\"Status\":\"In_use\",\"Type\":\"data\",\"PerformanceLevel\":\"PL0\",\"BdfId\":\"null\",\"EnableAutoSnapshot\":false,\"StorageSetId\":\"ss-i-bp1j4i2jdf3owlhe****\",\"StorageSetPartitionNumber\":11,\"DiskId\":\"d-bp18um4r4f2fve251\",\"DeleteAutoSnapshot\":false,\"StorageClusterId\":\"dbsc-j5e1sf2vaf5he8m2****\",\"Encrypted\":false,\"IOPSRead\":2000,\"MountInstanceNum\":1,\"Description\":\"testDescription\",\"Device\":\"/dev/xvdb\",\"DiskName\":\"testDiskName21\",\"Portable\":true,\"ImageId\":\"m-bp13aqm171qynt3u***\",\"KMSKeyId\":\"0e478b7a-4262-4802-b8cb-00d3fb408***\",\"DeleteWithInstance\":true,\"DetachedTime\":\"2021-06-07T21:01:22Z\",\"SourceSnapshotId\":\"s-bp67acfmxazb4p****\",\"AutoSnapshotPolicyId\":\"sp-bp67acfmxazb4p****\",\"EnableAutomatedSnapshotPolicy\":false,\"IOPSWrite\":2000,\"InstanceId\":\"i-bp67acfmxazb4q****\",\"IOPS\":4000,\"RegionId\":\"cn-hangzhou\",\"ExpiredTime\":\"2021-07-07T16:00Z\",\"Size\":10,\"ResourceGroupId\":\"rg-bp67acfmxazb4p****\",\"DiskChargeType\":\"PrePaid\",\"ZoneId\":\"cn-hangzhou-i\",\"AttachedTime\":\"2021-06-07T06:08:56Z\",\"Category\":\"cloud_ssd\",\"cloud_pperf\":\"jxsc000204\",\"MultiAttach\":\"Disabled\",\"OperationLocks\":{\"OperationLock\":[{\"LockReason\":\"security\"}]},\"MountInstances\":{\"MountInstance\":[{\"AttachedTime\":\"2017-12-05T2340:00Z\",\"InstanceId\":\"i-bp1j4i2jdf3owlhe****\",\"Device\":\"/dev/xvda\"}]},\"Tags\":{\"Tag\":[{\"TagValue\":\"TestValue\",\"TagKey\":\"TestKey\"}]},\"Attachments\":{\"Attachment\":[{\"InstanceId\":\"i-bp67acfmxazb4q****\",\"Device\":\"/dev/xvda\",\"AttachedTime\":\"2021-06-07T06:08:56Z\"}]},\"ProvisionedIops\":40000,\"BurstingEnabled\":false,\"Throughput\":100,\"ThroughputRead\":100,\"ThroughputWrite\":100}]}}"
        elif disk_ids == "d-bp131n0q38u3a4zi1":
            disk =  "{\"NextToken\":\"AAAAAdDWBF2****\",\"PageSize\":10,\"PageNumber\":1,\"RequestId\":\"473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E\",\"TotalCount\":1,\"Disks\":{\"Disk\":[{\"SerialNumber\":\"bp18um4r4f2fve2****\",\"CreationTime\":\"2021-06-07T06: 08: 54Z\",\"Status\":\"Available\",\"Type\":\"system\",\"PerformanceLevel\":\"PL0\",\"BdfId\":\"null\",\"EnableAutoSnapshot\":false,\"StorageSetId\":\"ss-i-bp1j4i2jdf3owlhe****\",\"StorageSetPartitionNumber\":11,\"DiskId\":\"d-bp131n0q38u3a4zi1\",\"DeleteAutoSnapshot\":false,\"StorageClusterId\":\"dbsc-j5e1sf2vaf5he8m2****\",\"Encrypted\":false,\"IOPSRead\":2000,\"MountInstanceNum\":1,\"Description\":\"testDescription\",\"Device\":\"/dev/xvdb\",\"DiskName\":\"Backupvolume_1\",\"Portable\":true,\"ImageId\":\"m-bp13aqm171qynt3u***\",\"KMSKeyId\":\"0e478b7a-4262-4802-b8cb-00d3fb408***\",\"DeleteWithInstance\":true,\"DetachedTime\":\"2021-06-07T21: 01: 22Z\",\"SourceSnapshotId\":\"s-bp67acfmxazb4p****\",\"AutoSnapshotPolicyId\":\"sp-bp67acfmxazb4p****\",\"EnableAutomatedSnapshotPolicy\":false,\"IOPSWrite\":2000,\"InstanceId\":\"i-bp1jyxrchangewlhe123\",\"IOPS\":4000,\"RegionId\":\"cn-hangzhou\",\"ExpiredTime\":\"2021-07-07T16: 00Z\",\"Size\":10,\"ResourceGroupId\":\"rg-bp67acfmxazb4p****\",\"DiskChargeType\":\"PrePaid\",\"ZoneId\":\"cn-hangzhou-i\",\"AttachedTime\":\"2021-06-07T06: 08: 56Z\",\"Category\":\"cloud_pperf\",\"ProductCode\":\"jxsc000204\",\"MultiAttach\":\"Disabled\",\"OperationLocks\":{\"OperationLock\":[{\"LockReason\":\"security\"}]},\"MountInstances\":{\"MountInstance\":[{\"AttachedTime\":\"2017-12-05T2340: 00Z\",\"InstanceId\":\"i-bp1j4i2jdf3owlhe****\",\"Device\":\"/dev/xvda\"}]},\"Tags\":{\"Tag\":[{\"TagValue\":\"TestValue\",\"TagKey\":\"TestKey\"}]},\"Attachments\":{\"Attachment\":[{\"InstanceId\":\"i-bp67acfmxazb4q****\",\"Device\":\"/dev/xvda\",\"AttachedTime\":\"2021-06-07T06: 08: 56Z\"}]},\"ProvisionedIops\":40000,\"BurstingEnabled\":false,\"Throughput\":100,\"ThroughputRead\":100,\"ThroughputWrite\":100}]}}"
            if self._attach:
                disk = "{\"NextToken\":\"AAAAAdDWBF2****\",\"PageSize\":10,\"PageNumber\":1,\"RequestId\":\"473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E\",\"TotalCount\":1,\"Disks\":{\"Disk\":[{\"SerialNumber\":\"bp18um4r4f2fve2****\",\"CreationTime\":\"2021-06-07T06: 08: 54Z\",\"Status\":\"In_use\",\"Type\":\"system\",\"PerformanceLevel\":\"PL0\",\"BdfId\":\"null\",\"EnableAutoSnapshot\":false,\"StorageSetId\":\"ss-i-bp1j4i2jdf3owlhe****\",\"StorageSetPartitionNumber\":11,\"DiskId\":\"d-bp131n0q38u3a4zi1\",\"DeleteAutoSnapshot\":false,\"StorageClusterId\":\"dbsc-j5e1sf2vaf5he8m2****\",\"Encrypted\":false,\"IOPSRead\":2000,\"MountInstanceNum\":1,\"Description\":\"testDescription\",\"Device\":\"/dev/xvdb\",\"DiskName\":\"Backupvolume_1\",\"Portable\":true,\"ImageId\":\"m-bp13aqm171qynt3u***\",\"KMSKeyId\":\"0e478b7a-4262-4802-b8cb-00d3fb408***\",\"DeleteWithInstance\":true,\"DetachedTime\":\"2021-06-07T21: 01: 22Z\",\"SourceSnapshotId\":\"s-bp67acfmxazb4p****\",\"AutoSnapshotPolicyId\":\"sp-bp67acfmxazb4p****\",\"EnableAutomatedSnapshotPolicy\":false,\"IOPSWrite\":2000,\"InstanceId\":\"i-bp1jyxrchangewlhe123\",\"IOPS\":4000,\"RegionId\":\"cn-hangzhou\",\"ExpiredTime\":\"2021-07-07T16: 00Z\",\"Size\":10,\"ResourceGroupId\":\"rg-bp67acfmxazb4p****\",\"DiskChargeType\":\"PrePaid\",\"ZoneId\":\"cn-hangzhou-i\",\"AttachedTime\":\"2021-06-07T06: 08: 56Z\",\"Category\":\"cloud_pperf\",\"ProductCode\":\"jxsc000204\",\"MultiAttach\":\"Disabled\",\"OperationLocks\":{\"OperationLock\":[{\"LockReason\":\"security\"}]},\"MountInstances\":{\"MountInstance\":[{\"AttachedTime\":\"2017-12-05T2340: 00Z\",\"InstanceId\":\"i-bp1j4i2jdf3owlhe****\",\"Device\":\"/dev/xvda\"}]},\"Tags\":{\"Tag\":[{\"TagValue\":\"TestValue\",\"TagKey\":\"TestKey\"}]},\"Attachments\":{\"Attachment\":[{\"InstanceId\":\"i-bp67acfmxazb4q****\",\"Device\":\"/dev/xvda\",\"AttachedTime\":\"2021-06-07T06: 08: 56Z\"}]},\"ProvisionedIops\":40000,\"BurstingEnabled\":false,\"Throughput\":100,\"ThroughputRead\":100,\"ThroughputWrite\":100}]}}"
        elif disk_ids == "d-bp131n0q38u3a4zi2":
            disk = "{\"NextToken\":\"AAAAAdDWBF2****\",\"PageSize\":10,\"PageNumber\":1,\"RequestId\":\"473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E\",\"TotalCount\":1,\"Disks\":{\"Disk\":[{\"SerialNumber\":\"bp18um4r4f2fve2****\",\"CreationTime\":\"2021-06-07T06: 08: 54Z\",\"Status\":\"Available\",\"Type\":\"system\",\"PerformanceLevel\":\"PL0\",\"BdfId\":\"null\",\"EnableAutoSnapshot\":false,\"StorageSetId\":\"ss-i-bp1j4i2jdf3owlhe****\",\"StorageSetPartitionNumber\":11,\"DiskId\":\"d-bp131n0q38u3a4zi2\",\"DeleteAutoSnapshot\":false,\"StorageClusterId\":\"dbsc-j5e1sf2vaf5he8m2****\",\"Encrypted\":false,\"IOPSRead\":2000,\"MountInstanceNum\":1,\"Description\":\"testDescription\",\"Device\":\"/dev/xvdb\",\"DiskName\":\"Backupvolume_1\",\"Portable\":true,\"ImageId\":\"m-bp13aqm171qynt3u***\",\"KMSKeyId\":\"0e478b7a-4262-4802-b8cb-00d3fb408***\",\"DeleteWithInstance\":true,\"DetachedTime\":\"2021-06-07T21: 01: 22Z\",\"SourceSnapshotId\":\"s-bp67acfmxazb4p****\",\"AutoSnapshotPolicyId\":\"sp-bp67acfmxazb4p****\",\"EnableAutomatedSnapshotPolicy\":false,\"IOPSWrite\":2000,\"InstanceId\":\"i-bp1jyxrchangewlhe123\",\"IOPS\":4000,\"RegionId\":\"cn-hangzhou\",\"ExpiredTime\":\"2021-07-07T16: 00Z\",\"Size\":10,\"ResourceGroupId\":\"rg-bp67acfmxazb4p****\",\"DiskChargeType\":\"PrePaid\",\"ZoneId\":\"cn-hangzhou-i\",\"AttachedTime\":\"2021-06-07T06: 08: 56Z\",\"Category\":\"cloud_pperf\",\"ProductCode\":\"jxsc000204\",\"MultiAttach\":\"Disabled\",\"OperationLocks\":{\"OperationLock\":[{\"LockReason\":\"security\"}]},\"MountInstances\":{\"MountInstance\":[{\"AttachedTime\":\"2017-12-05T2340: 00Z\",\"InstanceId\":\"i-bp1j4i2jdf3owlhe****\",\"Device\":\"/dev/xvda\"}]},\"Tags\":{\"Tag\":[{\"TagValue\":\"TestValue\",\"TagKey\":\"TestKey\"}]},\"Attachments\":{\"Attachment\":[{\"InstanceId\":\"i-bp67acfmxazb4q****\",\"Device\":\"/dev/xvda\",\"AttachedTime\":\"2021-06-07T06: 08: 56Z\"}]},\"ProvisionedIops\":40000,\"BurstingEnabled\":false,\"Throughput\":100,\"ThroughputRead\":100,\"ThroughputWrite\":100}]}}"
            if self._attach:
                disk = "{\"NextToken\":\"AAAAAdDWBF2****\",\"PageSize\":10,\"PageNumber\":1,\"RequestId\":\"473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E\",\"TotalCount\":1,\"Disks\":{\"Disk\":[{\"SerialNumber\":\"bp18um4r4f2fve2****\",\"CreationTime\":\"2021-06-07T06: 08: 54Z\",\"Status\":\"In_use\",\"Type\":\"system\",\"PerformanceLevel\":\"PL0\",\"BdfId\":\"null\",\"EnableAutoSnapshot\":false,\"StorageSetId\":\"ss-i-bp1j4i2jdf3owlhe****\",\"StorageSetPartitionNumber\":11,\"DiskId\":\"d-bp131n0q38u3a4zi2\",\"DeleteAutoSnapshot\":false,\"StorageClusterId\":\"dbsc-j5e1sf2vaf5he8m2****\",\"Encrypted\":false,\"IOPSRead\":2000,\"MountInstanceNum\":1,\"Description\":\"testDescription\",\"Device\":\"/dev/xvdb\",\"DiskName\":\"Backupvolume_1\",\"Portable\":true,\"ImageId\":\"m-bp13aqm171qynt3u***\",\"KMSKeyId\":\"0e478b7a-4262-4802-b8cb-00d3fb408***\",\"DeleteWithInstance\":true,\"DetachedTime\":\"2021-06-07T21: 01: 22Z\",\"SourceSnapshotId\":\"s-bp67acfmxazb4p****\",\"AutoSnapshotPolicyId\":\"sp-bp67acfmxazb4p****\",\"EnableAutomatedSnapshotPolicy\":false,\"IOPSWrite\":2000,\"InstanceId\":\"i-bp1jyxrchangewlhe123\",\"IOPS\":4000,\"RegionId\":\"cn-hangzhou\",\"ExpiredTime\":\"2021-07-07T16: 00Z\",\"Size\":10,\"ResourceGroupId\":\"rg-bp67acfmxazb4p****\",\"DiskChargeType\":\"PrePaid\",\"ZoneId\":\"cn-hangzhou-i\",\"AttachedTime\":\"2021-06-07T06: 08: 56Z\",\"Category\":\"cloud_pperf\",\"ProductCode\":\"jxsc000204\",\"MultiAttach\":\"Disabled\",\"OperationLocks\":{\"OperationLock\":[{\"LockReason\":\"security\"}]},\"MountInstances\":{\"MountInstance\":[{\"AttachedTime\":\"2017-12-05T2340: 00Z\",\"InstanceId\":\"i-bp1j4i2jdf3owlhe****\",\"Device\":\"/dev/xvda\"}]},\"Tags\":{\"Tag\":[{\"TagValue\":\"TestValue\",\"TagKey\":\"TestKey\"}]},\"Attachments\":{\"Attachment\":[{\"InstanceId\":\"i-bp67acfmxazb4q****\",\"Device\":\"/dev/xvda\",\"AttachedTime\":\"2021-06-07T06: 08: 56Z\"}]},\"ProvisionedIops\":40000,\"BurstingEnabled\":false,\"Throughput\":100,\"ThroughputRead\":100,\"ThroughputWrite\":100}]}}"
        elif disk_ids == "d-bp131n0q38u3a4zi3":
            disk = "{\"NextToken\":\"AAAAAdDWBF2****\",\"PageSize\":10,\"PageNumber\":1,\"RequestId\":\"473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E\",\"TotalCount\":1,\"Disks\":{\"Disk\":[{\"SerialNumber\":\"bp18um4r4f2fve2****\",\"CreationTime\":\"2021-06-07T06: 08: 54Z\",\"Status\":\"Available\",\"Type\":\"system\",\"PerformanceLevel\":\"PL0\",\"BdfId\":\"null\",\"EnableAutoSnapshot\":false,\"StorageSetId\":\"ss-i-bp1j4i2jdf3owlhe****\",\"StorageSetPartitionNumber\":11,\"DiskId\":\"d-bp131n0q38u3a4zi3\",\"DeleteAutoSnapshot\":false,\"StorageClusterId\":\"dbsc-j5e1sf2vaf5he8m2****\",\"Encrypted\":false,\"IOPSRead\":2000,\"MountInstanceNum\":1,\"Description\":\"testDescription\",\"Device\":\"/dev/xvdb\",\"DiskName\":\"Backupvolume_1\",\"Portable\":true,\"ImageId\":\"m-bp13aqm171qynt3u***\",\"KMSKeyId\":\"0e478b7a-4262-4802-b8cb-00d3fb408***\",\"DeleteWithInstance\":true,\"DetachedTime\":\"2021-06-07T21: 01: 22Z\",\"SourceSnapshotId\":\"s-bp67acfmxazb4p****\",\"AutoSnapshotPolicyId\":\"sp-bp67acfmxazb4p****\",\"EnableAutomatedSnapshotPolicy\":false,\"IOPSWrite\":2000,\"InstanceId\":\"i-bp1jyxrchangewlhe123\",\"IOPS\":4000,\"RegionId\":\"cn-hangzhou\",\"ExpiredTime\":\"2021-07-07T16: 00Z\",\"Size\":10,\"ResourceGroupId\":\"rg-bp67acfmxazb4p****\",\"DiskChargeType\":\"PrePaid\",\"ZoneId\":\"cn-hangzhou-i\",\"AttachedTime\":\"2021-06-07T06: 08: 56Z\",\"Category\":\"cloud_pperf\",\"ProductCode\":\"jxsc000204\",\"MultiAttach\":\"Disabled\",\"OperationLocks\":{\"OperationLock\":[{\"LockReason\":\"security\"}]},\"MountInstances\":{\"MountInstance\":[{\"AttachedTime\":\"2017-12-05T2340: 00Z\",\"InstanceId\":\"i-bp1j4i2jdf3owlhe****\",\"Device\":\"/dev/xvda\"}]},\"Tags\":{\"Tag\":[{\"TagValue\":\"TestValue\",\"TagKey\":\"TestKey\"}]},\"Attachments\":{\"Attachment\":[{\"InstanceId\":\"i-bp67acfmxazb4q****\",\"Device\":\"/dev/xvda\",\"AttachedTime\":\"2021-06-07T06: 08: 56Z\"}]},\"ProvisionedIops\":40000,\"BurstingEnabled\":false,\"Throughput\":100,\"ThroughputRead\":100,\"ThroughputWrite\":100}]}}"
            if self._attach:
                disk = "{\"NextToken\":\"AAAAAdDWBF2****\",\"PageSize\":10,\"PageNumber\":1,\"RequestId\":\"473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E\",\"TotalCount\":1,\"Disks\":{\"Disk\":[{\"SerialNumber\":\"bp18um4r4f2fve2****\",\"CreationTime\":\"2021-06-07T06: 08: 54Z\",\"Status\":\"In_use\",\"Type\":\"system\",\"PerformanceLevel\":\"PL0\",\"BdfId\":\"null\",\"EnableAutoSnapshot\":false,\"StorageSetId\":\"ss-i-bp1j4i2jdf3owlhe****\",\"StorageSetPartitionNumber\":11,\"DiskId\":\"d-bp131n0q38u3a4zi3\",\"DeleteAutoSnapshot\":false,\"StorageClusterId\":\"dbsc-j5e1sf2vaf5he8m2****\",\"Encrypted\":false,\"IOPSRead\":2000,\"MountInstanceNum\":1,\"Description\":\"testDescription\",\"Device\":\"/dev/xvdb\",\"DiskName\":\"Backupvolume_1\",\"Portable\":true,\"ImageId\":\"m-bp13aqm171qynt3u***\",\"KMSKeyId\":\"0e478b7a-4262-4802-b8cb-00d3fb408***\",\"DeleteWithInstance\":true,\"DetachedTime\":\"2021-06-07T21: 01: 22Z\",\"SourceSnapshotId\":\"s-bp67acfmxazb4p****\",\"AutoSnapshotPolicyId\":\"sp-bp67acfmxazb4p****\",\"EnableAutomatedSnapshotPolicy\":false,\"IOPSWrite\":2000,\"InstanceId\":\"i-bp1jyxrchangewlhe123\",\"IOPS\":4000,\"RegionId\":\"cn-hangzhou\",\"ExpiredTime\":\"2021-07-07T16: 00Z\",\"Size\":10,\"ResourceGroupId\":\"rg-bp67acfmxazb4p****\",\"DiskChargeType\":\"PrePaid\",\"ZoneId\":\"cn-hangzhou-i\",\"AttachedTime\":\"2021-06-07T06: 08: 56Z\",\"Category\":\"cloud_pperf\",\"ProductCode\":\"jxsc000204\",\"MultiAttach\":\"Disabled\",\"OperationLocks\":{\"OperationLock\":[{\"LockReason\":\"security\"}]},\"MountInstances\":{\"MountInstance\":[{\"AttachedTime\":\"2017-12-05T2340: 00Z\",\"InstanceId\":\"i-bp1j4i2jdf3owlhe****\",\"Device\":\"/dev/xvda\"}]},\"Tags\":{\"Tag\":[{\"TagValue\":\"TestValue\",\"TagKey\":\"TestKey\"}]},\"Attachments\":{\"Attachment\":[{\"InstanceId\":\"i-bp67acfmxazb4q****\",\"Device\":\"/dev/xvda\",\"AttachedTime\":\"2021-06-07T06: 08: 56Z\"}]},\"ProvisionedIops\":40000,\"BurstingEnabled\":false,\"Throughput\":100,\"ThroughputRead\":100,\"ThroughputWrite\":100}]}}"
        elif disk_ids == "d-bp131n0q38u3a4zi4":
            disk = "{\"NextToken\":\"AAAAAdDWBF2****\",\"PageSize\":10,\"PageNumber\":1,\"RequestId\":\"473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E\",\"TotalCount\":1,\"Disks\":{\"Disk\":[{\"SerialNumber\":\"bp18um4r4f2fve2****\",\"CreationTime\":\"2021-06-07T06: 08: 54Z\",\"Status\":\"Available\",\"Type\":\"system\",\"PerformanceLevel\":\"PL0\",\"BdfId\":\"null\",\"EnableAutoSnapshot\":false,\"StorageSetId\":\"ss-i-bp1j4i2jdf3owlhe****\",\"StorageSetPartitionNumber\":11,\"DiskId\":\"d-bp131n0q38u3a4zi4\",\"DeleteAutoSnapshot\":false,\"StorageClusterId\":\"dbsc-j5e1sf2vaf5he8m2****\",\"Encrypted\":false,\"IOPSRead\":2000,\"MountInstanceNum\":1,\"Description\":\"testDescription\",\"Device\":\"/dev/xvdb\",\"DiskName\":\"Backupvolume_1\",\"Portable\":true,\"ImageId\":\"m-bp13aqm171qynt3u***\",\"KMSKeyId\":\"0e478b7a-4262-4802-b8cb-00d3fb408***\",\"DeleteWithInstance\":true,\"DetachedTime\":\"2021-06-07T21: 01: 22Z\",\"SourceSnapshotId\":\"s-bp67acfmxazb4p****\",\"AutoSnapshotPolicyId\":\"sp-bp67acfmxazb4p****\",\"EnableAutomatedSnapshotPolicy\":false,\"IOPSWrite\":2000,\"InstanceId\":\"i-bp1jyxrchangewlhe123\",\"IOPS\":4000,\"RegionId\":\"cn-hangzhou\",\"ExpiredTime\":\"2021-07-07T16: 00Z\",\"Size\":10,\"ResourceGroupId\":\"rg-bp67acfmxazb4p****\",\"DiskChargeType\":\"PrePaid\",\"ZoneId\":\"cn-hangzhou-i\",\"AttachedTime\":\"2021-06-07T06: 08: 56Z\",\"Category\":\"cloud_pperf\",\"ProductCode\":\"jxsc000204\",\"MultiAttach\":\"Disabled\",\"OperationLocks\":{\"OperationLock\":[{\"LockReason\":\"security\"}]},\"MountInstances\":{\"MountInstance\":[{\"AttachedTime\":\"2017-12-05T2340: 00Z\",\"InstanceId\":\"i-bp1j4i2jdf3owlhe****\",\"Device\":\"/dev/xvda\"}]},\"Tags\":{\"Tag\":[{\"TagValue\":\"TestValue\",\"TagKey\":\"TestKey\"}]},\"Attachments\":{\"Attachment\":[{\"InstanceId\":\"i-bp67acfmxazb4q****\",\"Device\":\"/dev/xvda\",\"AttachedTime\":\"2021-06-07T06: 08: 56Z\"}]},\"ProvisionedIops\":40000,\"BurstingEnabled\":false,\"Throughput\":100,\"ThroughputRead\":100,\"ThroughputWrite\":100}]}}"
            if self._attach:
                disk = "{\"NextToken\":\"AAAAAdDWBF2****\",\"PageSize\":10,\"PageNumber\":1,\"RequestId\":\"473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E\",\"TotalCount\":1,\"Disks\":{\"Disk\":[{\"SerialNumber\":\"bp18um4r4f2fve2****\",\"CreationTime\":\"2021-06-07T06: 08: 54Z\",\"Status\":\"In_use\",\"Type\":\"system\",\"PerformanceLevel\":\"PL0\",\"BdfId\":\"null\",\"EnableAutoSnapshot\":false,\"StorageSetId\":\"ss-i-bp1j4i2jdf3owlhe****\",\"StorageSetPartitionNumber\":11,\"DiskId\":\"d-bp131n0q38u3a4zi4\",\"DeleteAutoSnapshot\":false,\"StorageClusterId\":\"dbsc-j5e1sf2vaf5he8m2****\",\"Encrypted\":false,\"IOPSRead\":2000,\"MountInstanceNum\":1,\"Description\":\"testDescription\",\"Device\":\"/dev/xvdb\",\"DiskName\":\"Backupvolume_1\",\"Portable\":true,\"ImageId\":\"m-bp13aqm171qynt3u***\",\"KMSKeyId\":\"0e478b7a-4262-4802-b8cb-00d3fb408***\",\"DeleteWithInstance\":true,\"DetachedTime\":\"2021-06-07T21: 01: 22Z\",\"SourceSnapshotId\":\"s-bp67acfmxazb4p****\",\"AutoSnapshotPolicyId\":\"sp-bp67acfmxazb4p****\",\"EnableAutomatedSnapshotPolicy\":false,\"IOPSWrite\":2000,\"InstanceId\":\"i-bp1jyxrchangewlhe123\",\"IOPS\":4000,\"RegionId\":\"cn-hangzhou\",\"ExpiredTime\":\"2021-07-07T16: 00Z\",\"Size\":10,\"ResourceGroupId\":\"rg-bp67acfmxazb4p****\",\"DiskChargeType\":\"PrePaid\",\"ZoneId\":\"cn-hangzhou-i\",\"AttachedTime\":\"2021-06-07T06: 08: 56Z\",\"Category\":\"cloud_pperf\",\"ProductCode\":\"jxsc000204\",\"MultiAttach\":\"Disabled\",\"OperationLocks\":{\"OperationLock\":[{\"LockReason\":\"security\"}]},\"MountInstances\":{\"MountInstance\":[{\"AttachedTime\":\"2017-12-05T2340: 00Z\",\"InstanceId\":\"i-bp1j4i2jdf3owlhe****\",\"Device\":\"/dev/xvda\"}]},\"Tags\":{\"Tag\":[{\"TagValue\":\"TestValue\",\"TagKey\":\"TestKey\"}]},\"Attachments\":{\"Attachment\":[{\"InstanceId\":\"i-bp67acfmxazb4q****\",\"Device\":\"/dev/xvda\",\"AttachedTime\":\"2021-06-07T06: 08: 56Z\"}]},\"ProvisionedIops\":40000,\"BurstingEnabled\":false,\"Throughput\":100,\"ThroughputRead\":100,\"ThroughputWrite\":100}]}}"
        elif disk_ids == "d-bp18um4r4f2fve24":
            disk = "{\"NextToken\":\"AAAAAdDWBF2****\",\"PageSize\":10,\"PageNumber\":1,\"RequestId\":\"473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E\",\"TotalCount\":1,\"Disks\":{\"Disk\":[{\"SerialNumber\":\"bp18um4r4f2fve2****\",\"CreationTime\":\"2021-06-07T06: 08: 54Z\",\"Status\":\"Available\",\"Type\":\"data\",\"PerformanceLevel\":\"PL0\",\"BdfId\":\"null\",\"EnableAutoSnapshot\":false,\"StorageSetId\":\"ss-i-bp1j4i2jdf3owlhe****\",\"StorageSetPartitionNumber\":11,\"DiskId\":\"d-bp18um4r4f2fve24\",\"DeleteAutoSnapshot\":false,\"StorageClusterId\":\"dbsc-j5e1sf2vaf5he8m2****\",\"Encrypted\":false,\"IOPSRead\":2000,\"MountInstanceNum\":1,\"Description\":\"testDescription\",\"Device\":\"/dev/xvdb\",\"DiskName\":\"Backupvolume_1\",\"Portable\":true,\"ImageId\":\"m-bp13aqm171qynt3u***\",\"KMSKeyId\":\"0e478b7a-4262-4802-b8cb-00d3fb408***\",\"DeleteWithInstance\":true,\"DetachedTime\":\"2021-06-07T21: 01: 22Z\",\"SourceSnapshotId\":\"s-bp67acfmxazb4p****\",\"AutoSnapshotPolicyId\":\"sp-bp67acfmxazb4p****\",\"EnableAutomatedSnapshotPolicy\":false,\"IOPSWrite\":2000,\"InstanceId\":\"i-bp1jyxrchangewlhe123\",\"IOPS\":4000,\"RegionId\":\"cn-hangzhou\",\"ExpiredTime\":\"2021-07-07T16: 00Z\",\"Size\":10,\"ResourceGroupId\":\"rg-bp67acfmxazb4p****\",\"DiskChargeType\":\"PrePaid\",\"ZoneId\":\"cn-hangzhou-i\",\"AttachedTime\":\"2021-06-07T06: 08: 56Z\",\"Category\":\"cloud_sperf\",\"ProductCode\":\"jxsc000204\",\"MultiAttach\":\"Disabled\",\"OperationLocks\":{\"OperationLock\":[{\"LockReason\":\"security\"}]},\"MountInstances\":{\"MountInstance\":[{\"AttachedTime\":\"2017-12-05T2340: 00Z\",\"InstanceId\":\"i-bp1j4i2jdf3owlhe****\",\"Device\":\"/dev/xvda\"}]},\"Tags\":{\"Tag\":[{\"TagValue\":\"TestValue\",\"TagKey\":\"TestKey\"}]},\"Attachments\":{\"Attachment\":[{\"InstanceId\":\"i-bp67acfmxazb4q****\",\"Device\":\"/dev/xvda\",\"AttachedTime\":\"2021-06-07T06: 08: 56Z\"}]},\"ProvisionedIops\":40000,\"BurstingEnabled\":false,\"Throughput\":100,\"ThroughputRead\":100,\"ThroughputWrite\":100}]}}"
            if self._attach:
                disk = "{\"NextToken\":\"AAAAAdDWBF2****\",\"PageSize\":10,\"PageNumber\":1,\"RequestId\":\"473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E\",\"TotalCount\":1,\"Disks\":{\"Disk\":[{\"SerialNumber\":\"bp18um4r4f2fve2****\",\"CreationTime\":\"2021-06-07T06: 08: 54Z\",\"Status\":\"In_use\",\"Type\":\"system\",\"PerformanceLevel\":\"PL0\",\"BdfId\":\"null\",\"EnableAutoSnapshot\":false,\"StorageSetId\":\"ss-i-bp1j4i2jdf3owlhe****\",\"StorageSetPartitionNumber\":11,\"DiskId\":\"d-bp18um4r4f2fve24\",\"DeleteAutoSnapshot\":false,\"StorageClusterId\":\"dbsc-j5e1sf2vaf5he8m2****\",\"Encrypted\":false,\"IOPSRead\":2000,\"MountInstanceNum\":1,\"Description\":\"testDescription\",\"Device\":\"/dev/xvdb\",\"DiskName\":\"Backupvolume_1\",\"Portable\":true,\"ImageId\":\"m-bp13aqm171qynt3u***\",\"KMSKeyId\":\"0e478b7a-4262-4802-b8cb-00d3fb408***\",\"DeleteWithInstance\":true,\"DetachedTime\":\"2021-06-07T21: 01: 22Z\",\"SourceSnapshotId\":\"s-bp67acfmxazb4p****\",\"AutoSnapshotPolicyId\":\"sp-bp67acfmxazb4p****\",\"EnableAutomatedSnapshotPolicy\":false,\"IOPSWrite\":2000,\"InstanceId\":\"i-bp1jyxrchangewlhe123\",\"IOPS\":4000,\"RegionId\":\"cn-hangzhou\",\"ExpiredTime\":\"2021-07-07T16: 00Z\",\"Size\":10,\"ResourceGroupId\":\"rg-bp67acfmxazb4p****\",\"DiskChargeType\":\"PrePaid\",\"ZoneId\":\"cn-hangzhou-i\",\"AttachedTime\":\"2021-06-07T06: 08: 56Z\",\"Category\":\"cloud_pperf\",\"ProductCode\":\"jxsc000204\",\"MultiAttach\":\"Disabled\",\"OperationLocks\":{\"OperationLock\":[{\"LockReason\":\"security\"}]},\"MountInstances\":{\"MountInstance\":[{\"AttachedTime\":\"2017-12-05T2340: 00Z\",\"InstanceId\":\"i-bp1j4i2jdf3owlhe****\",\"Device\":\"/dev/xvda\"}]},\"Tags\":{\"Tag\":[{\"TagValue\":\"TestValue\",\"TagKey\":\"TestKey\"}]},\"Attachments\":{\"Attachment\":[{\"InstanceId\":\"i-bp67acfmxazb4q****\",\"Device\":\"/dev/xvda\",\"AttachedTime\":\"2021-06-07T06: 08: 56Z\"}]},\"ProvisionedIops\":40000,\"BurstingEnabled\":false,\"Throughput\":100,\"ThroughputRead\":100,\"ThroughputWrite\":100}]}}"
        elif disk_ids == "d-bp18um4r4f2fve24985":
            disk = "{\"NextToken\":\"AAAAAdDWBF2****\",\"PageSize\":10,\"PageNumber\":1,\"RequestId\":\"473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E\",\"TotalCount\":1,\"Disks\":{\"Disk\":[{\"SerialNumber\":\"bp18um4r4f2fve2****\",\"CreationTime\":\"2021-06-07T06: 08: 54Z\",\"Status\":\"Available\",\"Type\":\"data\",\"PerformanceLevel\":\"PL0\",\"BdfId\":\"null\",\"EnableAutoSnapshot\":false,\"StorageSetId\":\"ss-i-bp1j4i2jdf3owlhe****\",\"StorageSetPartitionNumber\":11,\"DiskId\":\"d-bp18um4r4f2fve24985\",\"DeleteAutoSnapshot\":false,\"StorageClusterId\":\"dbsc-j5e1sf2vaf5he8m2****\",\"Encrypted\":false,\"IOPSRead\":2000,\"MountInstanceNum\":1,\"Description\":\"testDescription\",\"Device\":\"/dev/xvdb\",\"DiskName\":\"Backupvolume_1\",\"Portable\":true,\"ImageId\":\"m-bp13aqm171qynt3u***\",\"KMSKeyId\":\"0e478b7a-4262-4802-b8cb-00d3fb408***\",\"DeleteWithInstance\":true,\"DetachedTime\":\"2021-06-07T21: 01: 22Z\",\"SourceSnapshotId\":\"s-bp67acfmxazb4p****\",\"AutoSnapshotPolicyId\":\"sp-bp67acfmxazb4p****\",\"EnableAutomatedSnapshotPolicy\":false,\"IOPSWrite\":2000,\"InstanceId\":\"i-bp1jyxrchangewlhe123\",\"IOPS\":4000,\"RegionId\":\"cn-hangzhou\",\"ExpiredTime\":\"2021-07-07T16: 00Z\",\"Size\":10,\"ResourceGroupId\":\"rg-bp67acfmxazb4p****\",\"DiskChargeType\":\"PrePaid\",\"ZoneId\":\"cn-hangzhou-i\",\"AttachedTime\":\"2021-06-07T06: 08: 56Z\",\"Category\":\"cloud_pperf\",\"ProductCode\":\"jxsc000204\",\"MultiAttach\":\"Disabled\",\"OperationLocks\":{\"OperationLock\":[{\"LockReason\":\"security\"}]},\"MountInstances\":{\"MountInstance\":[{\"AttachedTime\":\"2017-12-05T2340: 00Z\",\"InstanceId\":\"i-bp1j4i2jdf3owlhe****\",\"Device\":\"/dev/xvda\"}]},\"Tags\":{\"Tag\":[{\"TagValue\":\"TestValue\",\"TagKey\":\"TestKey\"}]},\"Attachments\":{\"Attachment\":[{\"InstanceId\":\"i-bp67acfmxazb4q****\",\"Device\":\"/dev/xvda\",\"AttachedTime\":\"2021-06-07T06: 08: 56Z\"}]},\"ProvisionedIops\":40000,\"BurstingEnabled\":false,\"Throughput\":100,\"ThroughputRead\":100,\"ThroughputWrite\":100}]}}"
            if self._attach:
                disk = "{\"NextToken\":\"AAAAAdDWBF2****\",\"PageSize\":10,\"PageNumber\":1,\"RequestId\":\"473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E\",\"TotalCount\":1,\"Disks\":{\"Disk\":[{\"SerialNumber\":\"bp18um4r4f2fve2****\",\"CreationTime\":\"2021-06-07T06: 08: 54Z\",\"Status\":\"In_use\",\"Type\":\"data\",\"PerformanceLevel\":\"PL0\",\"BdfId\":\"null\",\"EnableAutoSnapshot\":false,\"StorageSetId\":\"ss-i-bp1j4i2jdf3owlhe****\",\"StorageSetPartitionNumber\":11,\"DiskId\":\"d-bp18um4r4f2fve24985\",\"DeleteAutoSnapshot\":false,\"StorageClusterId\":\"dbsc-j5e1sf2vaf5he8m2****\",\"Encrypted\":false,\"IOPSRead\":2000,\"MountInstanceNum\":1,\"Description\":\"testDescription\",\"Device\":\"/dev/xvdb\",\"DiskName\":\"Backupvolume_1\",\"Portable\":true,\"ImageId\":\"m-bp13aqm171qynt3u***\",\"KMSKeyId\":\"0e478b7a-4262-4802-b8cb-00d3fb408***\",\"DeleteWithInstance\":true,\"DetachedTime\":\"2021-06-07T21: 01: 22Z\",\"SourceSnapshotId\":\"s-bp67acfmxazb4p****\",\"AutoSnapshotPolicyId\":\"sp-bp67acfmxazb4p****\",\"EnableAutomatedSnapshotPolicy\":false,\"IOPSWrite\":2000,\"InstanceId\":\"i-bp1jyxrchangewlhe123\",\"IOPS\":4000,\"RegionId\":\"cn-hangzhou\",\"ExpiredTime\":\"2021-07-07T16: 00Z\",\"Size\":10,\"ResourceGroupId\":\"rg-bp67acfmxazb4p****\",\"DiskChargeType\":\"PrePaid\",\"ZoneId\":\"cn-hangzhou-i\",\"AttachedTime\":\"2021-06-07T06: 08: 56Z\",\"Category\":\"cloud_pperf\",\"ProductCode\":\"jxsc000204\",\"MultiAttach\":\"Disabled\",\"OperationLocks\":{\"OperationLock\":[{\"LockReason\":\"security\"}]},\"MountInstances\":{\"MountInstance\":[{\"AttachedTime\":\"2017-12-05T2340: 00Z\",\"InstanceId\":\"i-bp1j4i2jdf3owlhe****\",\"Device\":\"/dev/xvda\"}]},\"Tags\":{\"Tag\":[{\"TagValue\":\"TestValue\",\"TagKey\":\"TestKey\"}]},\"Attachments\":{\"Attachment\":[{\"InstanceId\":\"i-bp67acfmxazb4q****\",\"Device\":\"/dev/xvda\",\"AttachedTime\":\"2021-06-07T06: 08: 56Z\"}]},\"ProvisionedIops\":40000,\"BurstingEnabled\":false,\"Throughput\":100,\"ThroughputRead\":100,\"ThroughputWrite\":100}]}}"
        elif disk_ids == "d-bp18um4r4f2fve25":
            disk = "{\"NextToken\":\"AAAAAdDWBF2****\",\"PageSize\":10,\"PageNumber\":1,\"RequestId\":\"473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E\",\"TotalCount\":1,\"Disks\":{\"Disk\":[{\"SerialNumber\":\"bp18um4r4f2fve2****\",\"CreationTime\":\"2021-06-07T06: 08: 54Z\",\"Status\":\"Available\",\"Type\":\"system\",\"PerformanceLevel\":\"PL0\",\"BdfId\":\"null\",\"EnableAutoSnapshot\":false,\"StorageSetId\":\"ss-i-bp1j4i2jdf3owlhe****\",\"StorageSetPartitionNumber\":11,\"DiskId\":\"d-bp18um4r4f2fve25\",\"DeleteAutoSnapshot\":false,\"StorageClusterId\":\"dbsc-j5e1sf2vaf5he8m2****\",\"Encrypted\":false,\"IOPSRead\":2000,\"MountInstanceNum\":1,\"Description\":\"testDescription\",\"Device\":\"/dev/xvdb\",\"DiskName\":\"Backupvolume_1\",\"Portable\":true,\"ImageId\":\"m-bp13aqm171qynt3u***\",\"KMSKeyId\":\"0e478b7a-4262-4802-b8cb-00d3fb408***\",\"DeleteWithInstance\":true,\"DetachedTime\":\"2021-06-07T21: 01: 22Z\",\"SourceSnapshotId\":\"s-bp67acfmxazb4p****\",\"AutoSnapshotPolicyId\":\"sp-bp67acfmxazb4p****\",\"EnableAutomatedSnapshotPolicy\":false,\"IOPSWrite\":2000,\"InstanceId\":\"i-bp1jyxrchangewlhe123\",\"IOPS\":4000,\"RegionId\":\"cn-hangzhou\",\"ExpiredTime\":\"2021-07-07T16: 00Z\",\"Size\":10,\"ResourceGroupId\":\"rg-bp67acfmxazb4p****\",\"DiskChargeType\":\"PrePaid\",\"ZoneId\":\"cn-hangzhou-i\",\"AttachedTime\":\"2021-06-07T06: 08: 56Z\",\"Category\":\"cloud_pperf\",\"ProductCode\":\"jxsc000204\",\"MultiAttach\":\"Disabled\",\"OperationLocks\":{\"OperationLock\":[{\"LockReason\":\"security\"}]},\"MountInstances\":{\"MountInstance\":[{\"AttachedTime\":\"2017-12-05T2340: 00Z\",\"InstanceId\":\"i-bp1j4i2jdf3owlhe****\",\"Device\":\"/dev/xvda\"}]},\"Tags\":{\"Tag\":[{\"TagValue\":\"TestValue\",\"TagKey\":\"TestKey\"}]},\"Attachments\":{\"Attachment\":[{\"InstanceId\":\"i-bp67acfmxazb4q****\",\"Device\":\"/dev/xvda\",\"AttachedTime\":\"2021-06-07T06: 08: 56Z\"}]},\"ProvisionedIops\":40000,\"BurstingEnabled\":false,\"Throughput\":100,\"ThroughputRead\":100,\"ThroughputWrite\":100}]}}"
            if self._attach:
                disk = "{\"NextToken\":\"AAAAAdDWBF2****\",\"PageSize\":10,\"PageNumber\":1,\"RequestId\":\"473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E\",\"TotalCount\":1,\"Disks\":{\"Disk\":[{\"SerialNumber\":\"bp18um4r4f2fve2****\",\"CreationTime\":\"2021-06-07T06: 08: 54Z\",\"Status\":\"In_use\",\"Type\":\"system\",\"PerformanceLevel\":\"PL0\",\"BdfId\":\"null\",\"EnableAutoSnapshot\":false,\"StorageSetId\":\"ss-i-bp1j4i2jdf3owlhe****\",\"StorageSetPartitionNumber\":11,\"DiskId\":\"d-bp18um4r4f2fve25\",\"DeleteAutoSnapshot\":false,\"StorageClusterId\":\"dbsc-j5e1sf2vaf5he8m2****\",\"Encrypted\":false,\"IOPSRead\":2000,\"MountInstanceNum\":1,\"Description\":\"testDescription\",\"Device\":\"/dev/xvdb\",\"DiskName\":\"Backupvolume_1\",\"Portable\":true,\"ImageId\":\"m-bp13aqm171qynt3u***\",\"KMSKeyId\":\"0e478b7a-4262-4802-b8cb-00d3fb408***\",\"DeleteWithInstance\":true,\"DetachedTime\":\"2021-06-07T21: 01: 22Z\",\"SourceSnapshotId\":\"s-bp67acfmxazb4p****\",\"AutoSnapshotPolicyId\":\"sp-bp67acfmxazb4p****\",\"EnableAutomatedSnapshotPolicy\":false,\"IOPSWrite\":2000,\"InstanceId\":\"i-bp1jyxrchangewlhe123\",\"IOPS\":4000,\"RegionId\":\"cn-hangzhou\",\"ExpiredTime\":\"2021-07-07T16: 00Z\",\"Size\":10,\"ResourceGroupId\":\"rg-bp67acfmxazb4p****\",\"DiskChargeType\":\"PrePaid\",\"ZoneId\":\"cn-hangzhou-i\",\"AttachedTime\":\"2021-06-07T06: 08: 56Z\",\"Category\":\"cloud_pperf\",\"ProductCode\":\"jxsc000204\",\"MultiAttach\":\"Disabled\",\"OperationLocks\":{\"OperationLock\":[{\"LockReason\":\"security\"}]},\"MountInstances\":{\"MountInstance\":[{\"AttachedTime\":\"2017-12-05T2340: 00Z\",\"InstanceId\":\"i-bp1j4i2jdf3owlhe****\",\"Device\":\"/dev/xvda\"}]},\"Tags\":{\"Tag\":[{\"TagValue\":\"TestValue\",\"TagKey\":\"TestKey\"}]},\"Attachments\":{\"Attachment\":[{\"InstanceId\":\"i-bp67acfmxazb4q****\",\"Device\":\"/dev/xvda\",\"AttachedTime\":\"2021-06-07T06: 08: 56Z\"}]},\"ProvisionedIops\":40000,\"BurstingEnabled\":false,\"Throughput\":100,\"ThroughputRead\":100,\"ThroughputWrite\":100}]}}"
        elif disk_ids == "d-bp18um4r4f2fve251":
            disk = "{\"NextToken\":\"AAAAAdDWBF2****\",\"PageSize\":10,\"PageNumber\":1,\"RequestId\":\"473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E\",\"TotalCount\":1,\"Disks\":{\"Disk\":[{\"SerialNumber\":\"bp18um4r4f2fve2****\",\"CreationTime\":\"2021-06-07T06: 08: 54Z\",\"Status\":\"Available\",\"Type\":\"data\",\"PerformanceLevel\":\"PL0\",\"BdfId\":\"null\",\"EnableAutoSnapshot\":false,\"StorageSetId\":\"ss-i-bp1j4i2jdf3owlhe****\",\"StorageSetPartitionNumber\":11,\"DiskId\":\"d-bp18um4r4f2fve251\",\"DeleteAutoSnapshot\":false,\"StorageClusterId\":\"dbsc-j5e1sf2vaf5he8m2****\",\"Encrypted\":false,\"IOPSRead\":2000,\"MountInstanceNum\":1,\"Description\":\"testDescription\",\"Device\":\"/dev/xvdb\",\"DiskName\":\"Backupvolume_1\",\"Portable\":true,\"ImageId\":\"m-bp13aqm171qynt3u***\",\"KMSKeyId\":\"0e478b7a-4262-4802-b8cb-00d3fb408***\",\"DeleteWithInstance\":true,\"DetachedTime\":\"2021-06-07T21: 01: 22Z\",\"SourceSnapshotId\":\"s-bp67acfmxazb4p****\",\"AutoSnapshotPolicyId\":\"sp-bp67acfmxazb4p****\",\"EnableAutomatedSnapshotPolicy\":false,\"IOPSWrite\":2000,\"InstanceId\":\"i-bp1jyxrchangewlhe123\",\"IOPS\":4000,\"RegionId\":\"cn-hangzhou\",\"ExpiredTime\":\"2021-07-07T16: 00Z\",\"Size\":10,\"ResourceGroupId\":\"rg-bp67acfmxazb4p****\",\"DiskChargeType\":\"PrePaid\",\"ZoneId\":\"cn-hangzhou-i\",\"AttachedTime\":\"2021-06-07T06: 08: 56Z\",\"Category\":\"cloud_pperf\",\"ProductCode\":\"jxsc000204\",\"MultiAttach\":\"Disabled\",\"OperationLocks\":{\"OperationLock\":[{\"LockReason\":\"security\"}]},\"MountInstances\":{\"MountInstance\":[{\"AttachedTime\":\"2017-12-05T2340: 00Z\",\"InstanceId\":\"i-bp1j4i2jdf3owlhe****\",\"Device\":\"/dev/xvda\"}]},\"Tags\":{\"Tag\":[{\"TagValue\":\"TestValue\",\"TagKey\":\"TestKey\"}]},\"Attachments\":{\"Attachment\":[{\"InstanceId\":\"i-bp67acfmxazb4q****\",\"Device\":\"/dev/xvda\",\"AttachedTime\":\"2021-06-07T06: 08: 56Z\"}]},\"ProvisionedIops\":40000,\"BurstingEnabled\":false,\"Throughput\":100,\"ThroughputRead\":100,\"ThroughputWrite\":100}]}}"
            if self._attach:
                disk = "{\"NextToken\":\"AAAAAdDWBF2****\",\"PageSize\":10,\"PageNumber\":1,\"RequestId\":\"473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E\",\"TotalCount\":1,\"Disks\":{\"Disk\":[{\"SerialNumber\":\"bp18um4r4f2fve2****\",\"CreationTime\":\"2021-06-07T06: 08: 54Z\",\"Status\":\"In_use\",\"Type\":\"data\",\"PerformanceLevel\":\"PL0\",\"BdfId\":\"null\",\"EnableAutoSnapshot\":false,\"StorageSetId\":\"ss-i-bp1j4i2jdf3owlhe****\",\"StorageSetPartitionNumber\":11,\"DiskId\":\"d-bp18um4r4f2fve251\",\"DeleteAutoSnapshot\":false,\"StorageClusterId\":\"dbsc-j5e1sf2vaf5he8m2****\",\"Encrypted\":false,\"IOPSRead\":2000,\"MountInstanceNum\":1,\"Description\":\"testDescription\",\"Device\":\"/dev/xvdb\",\"DiskName\":\"Backupvolume_1\",\"Portable\":true,\"ImageId\":\"m-bp13aqm171qynt3u***\",\"KMSKeyId\":\"0e478b7a-4262-4802-b8cb-00d3fb408***\",\"DeleteWithInstance\":true,\"DetachedTime\":\"2021-06-07T21: 01: 22Z\",\"SourceSnapshotId\":\"s-bp67acfmxazb4p****\",\"AutoSnapshotPolicyId\":\"sp-bp67acfmxazb4p****\",\"EnableAutomatedSnapshotPolicy\":false,\"IOPSWrite\":2000,\"InstanceId\":\"i-bp1jyxrchangewlhe123\",\"IOPS\":4000,\"RegionId\":\"cn-hangzhou\",\"ExpiredTime\":\"2021-07-07T16: 00Z\",\"Size\":10,\"ResourceGroupId\":\"rg-bp67acfmxazb4p****\",\"DiskChargeType\":\"PrePaid\",\"ZoneId\":\"cn-hangzhou-i\",\"AttachedTime\":\"2021-06-07T06: 08: 56Z\",\"Category\":\"cloud_pperf\",\"ProductCode\":\"jxsc000204\",\"MultiAttach\":\"Disabled\",\"OperationLocks\":{\"OperationLock\":[{\"LockReason\":\"security\"}]},\"MountInstances\":{\"MountInstance\":[{\"AttachedTime\":\"2017-12-05T2340: 00Z\",\"InstanceId\":\"i-bp1j4i2jdf3owlhe****\",\"Device\":\"/dev/xvda\"}]},\"Tags\":{\"Tag\":[{\"TagValue\":\"TestValue\",\"TagKey\":\"TestKey\"}]},\"Attachments\":{\"Attachment\":[{\"InstanceId\":\"i-bp67acfmxazb4q****\",\"Device\":\"/dev/xvda\",\"AttachedTime\":\"2021-06-07T06: 08: 56Z\"}]},\"ProvisionedIops\":40000,\"BurstingEnabled\":false,\"Throughput\":100,\"ThroughputRead\":100,\"ThroughputWrite\":100}]}}"
        elif disk_ids == "d-bp18um4r4f2fve24100":
            disk = "{\"NextToken\":\"AAAAAdDWBF2****\",\"PageSize\":10,\"PageNumber\":1,\"RequestId\":\"473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E\",\"TotalCount\":1,\"Disks\":{\"Disk\":[{\"SerialNumber\":\"bp18um4r4f2fve2****\",\"CreationTime\":\"2021-06-07T06: 08: 54Z\",\"Status\":\"Available\",\"Type\":\"data\",\"PerformanceLevel\":\"PL0\",\"BdfId\":\"null\",\"EnableAutoSnapshot\":false,\"StorageSetId\":\"ss-i-bp1j4i2jdf3owlhe****\",\"StorageSetPartitionNumber\":11,\"DiskId\":\"d-bp18um4r4f2fve24100\",\"DeleteAutoSnapshot\":false,\"StorageClusterId\":\"dbsc-j5e1sf2vaf5he8m2****\",\"Encrypted\":false,\"IOPSRead\":2000,\"MountInstanceNum\":1,\"Description\":\"testDescription\",\"Device\":\"/dev/xvdb\",\"DiskName\":\"Backupvolume_1\",\"Portable\":true,\"ImageId\":\"m-bp13aqm171qynt3u***\",\"KMSKeyId\":\"0e478b7a-4262-4802-b8cb-00d3fb408***\",\"DeleteWithInstance\":true,\"DetachedTime\":\"2021-06-07T21: 01: 22Z\",\"SourceSnapshotId\":\"s-bp67acfmxazb4p****\",\"AutoSnapshotPolicyId\":\"sp-bp67acfmxazb4p****\",\"EnableAutomatedSnapshotPolicy\":false,\"IOPSWrite\":2000,\"InstanceId\":\"i-bp1jyxrchangewlhe123\",\"IOPS\":4000,\"RegionId\":\"cn-hangzhou\",\"ExpiredTime\":\"2021-07-07T16: 00Z\",\"Size\":20,\"ResourceGroupId\":\"rg-bp67acfmxazb4p****\",\"DiskChargeType\":\"PrePaid\",\"ZoneId\":\"cn-hangzhou-i\",\"AttachedTime\":\"2021-06-07T06: 08: 56Z\",\"Category\":\"cloud_pperf\",\"ProductCode\":\"jxsc000204\",\"MultiAttach\":\"Disabled\",\"OperationLocks\":{\"OperationLock\":[{\"LockReason\":\"security\"}]},\"MountInstances\":{\"MountInstance\":[{\"AttachedTime\":\"2017-12-05T2340: 00Z\",\"InstanceId\":\"i-bp1j4i2jdf3owlhe****\",\"Device\":\"/dev/xvda\"}]},\"Tags\":{\"Tag\":[{\"TagValue\":\"TestValue\",\"TagKey\":\"TestKey\"}]},\"Attachments\":{\"Attachment\":[{\"InstanceId\":\"i-bp67acfmxazb4q****\",\"Device\":\"/dev/xvda\",\"AttachedTime\":\"2021-06-07T06: 08: 56Z\"}]},\"ProvisionedIops\":40000,\"BurstingEnabled\":false,\"Throughput\":100,\"ThroughputRead\":100,\"ThroughputWrite\":100}]}}"
            if self._attach:
                disk = "{\"NextToken\":\"AAAAAdDWBF2****\",\"PageSize\":10,\"PageNumber\":1,\"RequestId\":\"473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E\",\"TotalCount\":1,\"Disks\":{\"Disk\":[{\"SerialNumber\":\"bp18um4r4f2fve2****\",\"CreationTime\":\"2021-06-07T06: 08: 54Z\",\"Status\":\"In_use\",\"Type\":\"data\",\"PerformanceLevel\":\"PL0\",\"BdfId\":\"null\",\"EnableAutoSnapshot\":false,\"StorageSetId\":\"ss-i-bp1j4i2jdf3owlhe****\",\"StorageSetPartitionNumber\":11,\"DiskId\":\"d-bp18um4r4f2fve24100\",\"DeleteAutoSnapshot\":false,\"StorageClusterId\":\"dbsc-j5e1sf2vaf5he8m2****\",\"Encrypted\":false,\"IOPSRead\":2000,\"MountInstanceNum\":1,\"Description\":\"testDescription\",\"Device\":\"/dev/xvdb\",\"DiskName\":\"Backupvolume_1\",\"Portable\":true,\"ImageId\":\"m-bp13aqm171qynt3u***\",\"KMSKeyId\":\"0e478b7a-4262-4802-b8cb-00d3fb408***\",\"DeleteWithInstance\":true,\"DetachedTime\":\"2021-06-07T21: 01: 22Z\",\"SourceSnapshotId\":\"s-bp67acfmxazb4p****\",\"AutoSnapshotPolicyId\":\"sp-bp67acfmxazb4p****\",\"EnableAutomatedSnapshotPolicy\":false,\"IOPSWrite\":2000,\"InstanceId\":\"i-bp1jyxrchangewlhe123\",\"IOPS\":4000,\"RegionId\":\"cn-hangzhou\",\"ExpiredTime\":\"2021-07-07T16: 00Z\",\"Size\":20,\"ResourceGroupId\":\"rg-bp67acfmxazb4p****\",\"DiskChargeType\":\"PrePaid\",\"ZoneId\":\"cn-hangzhou-i\",\"AttachedTime\":\"2021-06-07T06: 08: 56Z\",\"Category\":\"cloud_pperf\",\"ProductCode\":\"jxsc000204\",\"MultiAttach\":\"Disabled\",\"OperationLocks\":{\"OperationLock\":[{\"LockReason\":\"security\"}]},\"MountInstances\":{\"MountInstance\":[{\"AttachedTime\":\"2017-12-05T2340: 00Z\",\"InstanceId\":\"i-bp1j4i2jdf3owlhe****\",\"Device\":\"/dev/xvda\"}]},\"Tags\":{\"Tag\":[{\"TagValue\":\"TestValue\",\"TagKey\":\"TestKey\"}]},\"Attachments\":{\"Attachment\":[{\"InstanceId\":\"i-bp67acfmxazb4q****\",\"Device\":\"/dev/xvda\",\"AttachedTime\":\"2021-06-07T06: 08: 56Z\"}]},\"ProvisionedIops\":40000,\"BurstingEnabled\":false,\"Throughput\":100,\"ThroughputRead\":100,\"ThroughputWrite\":100}]}}"
        elif disk_ids == "d-bp131n0q38u3a4zi5":
            disk = "{\"NextToken\":\"AAAAAdDWBF2****\",\"PageSize\":10,\"PageNumber\":1,\"RequestId\":\"473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E\",\"TotalCount\":1,\"Disks\":{\"Disk\":[{\"SerialNumber\":\"bp18um4r4f2fve2****\",\"CreationTime\":\"2021-06-07T06: 08: 54Z\",\"Status\":\"Available\",\"Type\":\"system\",\"PerformanceLevel\":\"PL0\",\"BdfId\":\"null\",\"EnableAutoSnapshot\":false,\"StorageSetId\":\"ss-i-bp1j4i2jdf3owlhe****\",\"StorageSetPartitionNumber\":11,\"DiskId\":\"d-bp131n0q38u3a4zi5\",\"DeleteAutoSnapshot\":false,\"StorageClusterId\":\"dbsc-j5e1sf2vaf5he8m2****\",\"Encrypted\":false,\"IOPSRead\":2000,\"MountInstanceNum\":1,\"Description\":\"testDescription\",\"Device\":\"/dev/xvdb\",\"DiskName\":\"Backupvolume_1\",\"Portable\":true,\"ImageId\":\"m-bp13aqm171qynt3u***\",\"KMSKeyId\":\"0e478b7a-4262-4802-b8cb-00d3fb408***\",\"DeleteWithInstance\":true,\"DetachedTime\":\"2021-06-07T21: 01: 22Z\",\"SourceSnapshotId\":\"s-bp67acfmxazb4p****\",\"AutoSnapshotPolicyId\":\"sp-bp67acfmxazb4p****\",\"EnableAutomatedSnapshotPolicy\":false,\"IOPSWrite\":2000,\"InstanceId\":\"i-bp1jyxrchangewlhe123\",\"IOPS\":4000,\"RegionId\":\"cn-hangzhou\",\"ExpiredTime\":\"2021-07-07T16: 00Z\",\"Size\":10,\"ResourceGroupId\":\"rg-bp67acfmxazb4p****\",\"DiskChargeType\":\"PrePaid\",\"ZoneId\":\"cn-hangzhou-i\",\"AttachedTime\":\"2021-06-07T06: 08: 56Z\",\"Category\":\"cloud_pperf\",\"ProductCode\":\"jxsc000204\",\"MultiAttach\":\"Disabled\",\"OperationLocks\":{\"OperationLock\":[{\"LockReason\":\"security\"}]},\"MountInstances\":{\"MountInstance\":[{\"AttachedTime\":\"2017-12-05T2340: 00Z\",\"InstanceId\":\"i-bp1j4i2jdf3owlhe****\",\"Device\":\"/dev/xvda\"}]},\"Tags\":{\"Tag\":[{\"TagValue\":\"TestValue\",\"TagKey\":\"TestKey\"}]},\"Attachments\":{\"Attachment\":[{\"InstanceId\":\"i-bp67acfmxazb4q****\",\"Device\":\"/dev/xvda\",\"AttachedTime\":\"2021-06-07T06: 08: 56Z\"}]},\"ProvisionedIops\":40000,\"BurstingEnabled\":false,\"Throughput\":100,\"ThroughputRead\":100,\"ThroughputWrite\":100}]}}"
            if self._attach:
                disk = "{\"NextToken\":\"AAAAAdDWBF2****\",\"PageSize\":10,\"PageNumber\":1,\"RequestId\":\"473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E\",\"TotalCount\":1,\"Disks\":{\"Disk\":[{\"SerialNumber\":\"bp18um4r4f2fve2****\",\"CreationTime\":\"2021-06-07T06: 08: 54Z\",\"Status\":\"In_use\",\"Type\":\"system\",\"PerformanceLevel\":\"PL0\",\"BdfId\":\"null\",\"EnableAutoSnapshot\":false,\"StorageSetId\":\"ss-i-bp1j4i2jdf3owlhe****\",\"StorageSetPartitionNumber\":11,\"DiskId\":\"d-bp131n0q38u3a4zi5\",\"DeleteAutoSnapshot\":false,\"StorageClusterId\":\"dbsc-j5e1sf2vaf5he8m2****\",\"Encrypted\":false,\"IOPSRead\":2000,\"MountInstanceNum\":1,\"Description\":\"testDescription\",\"Device\":\"/dev/xvdb\",\"DiskName\":\"Backupvolume_1\",\"Portable\":true,\"ImageId\":\"m-bp13aqm171qynt3u***\",\"KMSKeyId\":\"0e478b7a-4262-4802-b8cb-00d3fb408***\",\"DeleteWithInstance\":true,\"DetachedTime\":\"2021-06-07T21: 01: 22Z\",\"SourceSnapshotId\":\"s-bp67acfmxazb4p****\",\"AutoSnapshotPolicyId\":\"sp-bp67acfmxazb4p****\",\"EnableAutomatedSnapshotPolicy\":false,\"IOPSWrite\":2000,\"InstanceId\":\"i-bp1jyxrchangewlhe123\",\"IOPS\":4000,\"RegionId\":\"cn-hangzhou\",\"ExpiredTime\":\"2021-07-07T16: 00Z\",\"Size\":10,\"ResourceGroupId\":\"rg-bp67acfmxazb4p****\",\"DiskChargeType\":\"PrePaid\",\"ZoneId\":\"cn-hangzhou-i\",\"AttachedTime\":\"2021-06-07T06: 08: 56Z\",\"Category\":\"cloud_pperf\",\"ProductCode\":\"jxsc000204\",\"MultiAttach\":\"Disabled\",\"OperationLocks\":{\"OperationLock\":[{\"LockReason\":\"security\"}]},\"MountInstances\":{\"MountInstance\":[{\"AttachedTime\":\"2017-12-05T2340: 00Z\",\"InstanceId\":\"i-bp1j4i2jdf3owlhe****\",\"Device\":\"/dev/xvda\"}]},\"Tags\":{\"Tag\":[{\"TagValue\":\"TestValue\",\"TagKey\":\"TestKey\"}]},\"Attachments\":{\"Attachment\":[{\"InstanceId\":\"i-bp67acfmxazb4q****\",\"Device\":\"/dev/xvda\",\"AttachedTime\":\"2021-06-07T06: 08: 56Z\"}]},\"ProvisionedIops\":40000,\"BurstingEnabled\":false,\"Throughput\":100,\"ThroughputRead\":100,\"ThroughputWrite\":100}]}}"

        return disk

    def create_snapshotgroup(self, regionId, instance_id, snapGroupName="", excludeDiskId="", **kwargs):
        createSnapshotGroup = ""
        if instance_id == "i-bp1jyxrChangewlhe566":
            createSnapshotGroup = "{\"RequestId\": \"ssg-j6ciyh3k52qp7ovm****\",\"SnapshotGroupId\": \"01ABBD93-1ABB-4D92-B496-1A3D20EC****\"}"
        elif instance_id == "i-bp1j4i2jdf3owlhe1111321":
            createSnapshotGroup = "{\"RequestId\": \"ssg-j6ciyh3k52qp7ovm****\",\"SnapshotGroupId\": \"01ABBD93-1ABB-4D92-B496-1A3D20ED****\"}"
        return createSnapshotGroup
    
    def list_snapshotgroup(self, regionId, snapshotGroupId="", **kwargs):
        snapshotGroup = ""
        if snapshotGroupId == "01ABBD93-1ABB-4D92-B496-1A3D20EC****":
            snapshotGroup = "{\"NextToken\":\"caeba0bbb2be03f84eb48b699f0a4883\",\"RequestId\":\"3F9A4CC4-362F-469A-B9EF-B3204EF8AA3A\",\"SnapshotGroups\":{\"SnapshotGroup\":[{\"Status\":\"accomplished\",\"CreationTime\":\"2021-03-23T10:58:48Z\",\"Description\":\"Thisisdescription.\",\"ProgressStatus\":\"null\",\"SnapshotGroupId\":\"ssg-j6ciyh3k52qp7ovm****\",\"InstanceId\":\"i-j6ca469urv8ei629****\",\"Name\":\"testName\",\"ResourceGroupId\":\"rg-bp67acfmxazb4p****\",\"Tags\":{\"Tag\":[{\"Key\":\"TestKey\",\"Value\":\"TestValue\"}]},\"Snapshots\":{\"Snapshot\":[{\"SourceDiskId\":\"d-bp18um4r4f2fve24\",\"Progress\":\"100%\",\"Available\":false,\"InstantAccessRetentionDays\":3,\"SnapshotId\":\"s-bp17441ohwka0yuh1****\",\"InstantAccess\":true,\"SourceDiskType\":\"system\",\"Tags\":{\"Tag\":[{\"Key\":\"acs:ecs:createFrom\",\"Value\":\"i-bp11qm0o3dk4iuc****\"}]}},{\"SourceDiskId\":\"d-bp18um4r4f2fve24985\",\"Progress\":\"100%\",\"Available\":false,\"InstantAccessRetentionDays\":3,\"SnapshotId\":\"s-bp17441ohwka0yuh3****\",\"InstantAccess\":true,\"SourceDiskType\":\"system\",\"Tags\":{\"Tag\":[{\"Key\":\"acs:ecs:createFrom\",\"Value\":\"i-bp11qm0o3dk4iuc****\"}]}},{\"SourceDiskId\":\"d-bp18um4r4f2fve24100\",\"Progress\":\"100%\",\"Available\":false,\"InstantAccessRetentionDays\":3,\"SnapshotId\":\"s-bp17441ohwka0yuh5****\",\"InstantAccess\":true,\"SourceDiskType\":\"system\",\"Tags\":{\"Tag\":[{\"Key\":\"acs:ecs:createFrom\",\"Value\":\"i-bp11qm0o3dk4iuc****\"}]}}]}}]}}"
        elif snapshotGroupId == "01ABBD93-1ABB-4D92-B496-1A3D20ED****":
            snapshotGroup = "{\"NextToken\":\"caeba0bbb2be03f84eb48b699f0a4883\",\"RequestId\":\"3F9A4CC4-362F-469A-B9EF-B3204EF8AA3A\",\"SnapshotGroups\":{\"SnapshotGroup\":[{\"Status\":\"accomplished\",\"CreationTime\":\"2021-03-23T10:58:48Z\",\"Description\":\"Thisisdescription.\",\"ProgressStatus\":\"null\",\"SnapshotGroupId\":\"ssg-j6ciyh3k52qp7ovm****\",\"InstanceId\":\"i-j6ca469urv8ei629****\",\"Name\":\"testName\",\"ResourceGroupId\":\"rg-bp67acfmxazb4p****\",\"Tags\":{\"Tag\":[{\"Key\":\"TestKey\",\"Value\":\"TestValue\"}]},\"Snapshots\":{\"Snapshot\":[{\"SourceDiskId\":\"d-bp18um4r4f2fve24\",\"Progress\":\"100%\",\"Available\":false,\"InstantAccessRetentionDays\":3,\"SnapshotId\":\"s-bp17441ohwka0yuh1****\",\"InstantAccess\":true,\"SourceDiskType\":\"system\",\"Tags\":{\"Tag\":[{\"Key\":\"acs:ecs:createFrom\",\"Value\":\"i-bp11qm0o3dk4iuc****\"}]}},{\"SourceDiskId\":\"d-bp18um4r4f2fve24985\",\"Progress\":\"100%\",\"Available\":false,\"InstantAccessRetentionDays\":3,\"SnapshotId\":\"s-bp17441ohwka0yuh3****\",\"InstantAccess\":true,\"SourceDiskType\":\"system\",\"Tags\":{\"Tag\":[{\"Key\":\"acs:ecs:createFrom\",\"Value\":\"i-bp11qm0o3dk4iuc****\"}]}},{\"SourceDiskId\":\"d-bp18um4r4f2fve24100\",\"Progress\":\"100%\",\"Available\":false,\"InstantAccessRetentionDays\":3,\"SnapshotId\":\"s-bp17441ohwka0yuh5****\",\"InstantAccess\":true,\"SourceDiskType\":\"system\",\"Tags\":{\"Tag\":[{\"Key\":\"acs:ecs:createFrom\",\"Value\":\"i-bp11qm0o3dk4iuc****\"}]}}]}}]}}"

        return snapshotGroup
    
    def create_snapshot(self, diskId, snapName="", description="", **kwargs):
        createSnapshotRes = ""
        if diskId == "d-bp18um4r4f2fve24":
            createSnapshotRes = "{\"SnapshotId\":\"s-bp17441ohwka0yuh1****\",\"RequestId\":\"473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E\"}"
        elif diskId == "d-bp18um4r4f2fve25":
            createSnapshotRes = "{\"SnapshotId\":\"s-bp17441ohwka0yuh2****\",\"RequestId\":\"473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E\"}"
        elif diskId == "d-bp18um4r4f2fve24985":
            createSnapshotRes = "{\"SnapshotId\":\"s-bp17441ohwka0yuh3****\",\"RequestId\":\"473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E\"}"
        elif diskId == "d-bp18um4r4f2fve251":
            createSnapshotRes = "{\"SnapshotId\":\"s-bp17441ohwka0yuh4****\",\"RequestId\":\"473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E\"}"
        elif diskId == "d-bp18um4r4f2fve24100":
            createSnapshotRes = "{\"SnapshotId\":\"s-bp17441ohwka0yuh5****\",\"RequestId\":\"473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E\"}"
        return createSnapshotRes

    def list_snapshot(self, regionId, snapshotId, diskId="", **kwargs):
        snapshot = "{\"NextToken\":\"caeba0bbb2be03f84eb48b699f0a4883\",\"PageSize\":10,\"PageNumber\":1,\"RequestId\":\"473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E\",\"TotalCount\":0,\"Snapshots\":{\"Snapshot\":[]}}"
        if self._delete_snapshot:
            return snapshot
        if snapshotId == "s-bp17441ohwka0yuh1****" or diskId == "d-bp18um4r4f2fve24":
            snapshot = "{\"NextToken\":\"caeba0bbb2be03f84eb48b699f0a4883\",\"PageSize\":10,\"PageNumber\":1,\"RequestId\":\"473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E\",\"TotalCount\":1,\"Snapshots\":{\"Snapshot\":[{\"Status\":\"accomplished\",\"CreationTime\":\"2020-08-20T14:52:28Z\",\"Progress\":\"100%\",\"InstantAccess\":false,\"Available\":false,\"RemainTime\":38,\"SourceDiskSize\":\"10\",\"RetentionDays\":30,\"SourceDiskType\":\"system\",\"SourceStorageType\":\"disk\",\"Usage\":\"image\",\"LastModifiedTime\":\"2020-08-25T14:18:09Z\",\"Encrypted\":false,\"SnapshotType\":\"all\",\"SourceDiskId\":\"d-bp18um4r4f2fve24\",\"SnapshotName\":\"testSnapshotName\",\"InstantAccessRetentionDays\":30,\"Description\":\"testDescription\",\"SnapshotId\":\"s-bp17441ohwka0yuh1****\",\"ResourceGroupId\":\"rg-bp67acfmxazb4p****\",\"Category\":\"standard\",\"KMSKeyId\":\"0e478b7a-4262-4802-b8cb-00d3fb40****\",\"SnapshotSN\":\"64472-116742336-61976****\",\"ProductCode\":\"jxsc000****\",\"SourceSnapshotId\":\"s-bp67acfmxazb4p1****\",\"SourceRegionId\":\"cn-hangzhou\",\"Tags\":{\"Tag\":[{\"TagValue\":\"TestValue\",\"TagKey\":\"TestKey\"}]}}]}}"
        elif snapshotId == "s-bp17441ohwka0yuh2****" or diskId == "d-bp18um4r4f2fve25":
            snapshot = "{\"NextToken\":\"caeba0bbb2be03f84eb48b699f0a4883\",\"PageSize\":10,\"PageNumber\":1,\"RequestId\":\"473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E\",\"TotalCount\":1,\"Snapshots\":{\"Snapshot\":[{\"Status\":\"accomplished\",\"CreationTime\":\"2020-08-20T14:52:28Z\",\"Progress\":\"100%\",\"InstantAccess\":false,\"Available\":false,\"RemainTime\":38,\"SourceDiskSize\":\"10\",\"RetentionDays\":30,\"SourceDiskType\":\"system\",\"SourceStorageType\":\"disk\",\"Usage\":\"image\",\"LastModifiedTime\":\"2020-08-25T14:18:09Z\",\"Encrypted\":false,\"SnapshotType\":\"all\",\"SourceDiskId\":\"d-bp18um4r4f2fve25\",\"SnapshotName\":\"testSnapshotName\",\"InstantAccessRetentionDays\":30,\"Description\":\"testDescription\",\"SnapshotId\":\"s-bp17441ohwka0yuh2****\",\"ResourceGroupId\":\"rg-bp67acfmxazb4p****\",\"Category\":\"standard\",\"KMSKeyId\":\"0e478b7a-4262-4802-b8cb-00d3fb40****\",\"SnapshotSN\":\"64472-116742336-61976****\",\"ProductCode\":\"jxsc000****\",\"SourceSnapshotId\":\"s-bp67acfmxazb4p2****\",\"SourceRegionId\":\"cn-hangzhou\",\"Tags\":{\"Tag\":[{\"TagValue\":\"TestValue\",\"TagKey\":\"TestKey\"}]}}]}}"
        elif snapshotId == "s-bp17441ohwka0yuh3****" or diskId == "d-bp18um4r4f2fve24985":
            snapshot = "{\"NextToken\":\"caeba0bbb2be03f84eb48b699f0a4883\",\"PageSize\":10,\"PageNumber\":1,\"RequestId\":\"473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E\",\"TotalCount\":1,\"Snapshots\":{\"Snapshot\":[{\"Status\":\"accomplished\",\"CreationTime\":\"2020-08-20T14:52:28Z\",\"Progress\":\"100%\",\"InstantAccess\":false,\"Available\":false,\"RemainTime\":38,\"SourceDiskSize\":\"10\",\"RetentionDays\":30,\"SourceDiskType\":\"system\",\"SourceStorageType\":\"disk\",\"Usage\":\"image\",\"LastModifiedTime\":\"2020-08-25T14:18:09Z\",\"Encrypted\":false,\"SnapshotType\":\"all\",\"SourceDiskId\":\"d-bp18um4r4f2fve24985\",\"SnapshotName\":\"testSnapshotName\",\"InstantAccessRetentionDays\":30,\"Description\":\"testDescription\",\"SnapshotId\":\"s-bp17441ohwka0yuh3****\",\"ResourceGroupId\":\"rg-bp67acfmxazb4p****\",\"Category\":\"standard\",\"KMSKeyId\":\"0e478b7a-4262-4802-b8cb-00d3fb40****\",\"SnapshotSN\":\"64472-116742336-61976****\",\"ProductCode\":\"jxsc000****\",\"SourceSnapshotId\":\"s-bp67acfmxazb4p3****\",\"SourceRegionId\":\"cn-hangzhou\",\"Tags\":{\"Tag\":[{\"TagValue\":\"TestValue\",\"TagKey\":\"TestKey\"}]}}]}}"
        elif snapshotId == "s-bp17441ohwka0yuh4****" or diskId == "d-bp18um4r4f2fve251":
            snapshot = "{\"NextToken\":\"caeba0bbb2be03f84eb48b699f0a4883\",\"PageSize\":10,\"PageNumber\":1,\"RequestId\":\"473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E\",\"TotalCount\":1,\"Snapshots\":{\"Snapshot\":[{\"Status\":\"accomplished\",\"CreationTime\":\"2020-08-20T14:52:28Z\",\"Progress\":\"100%\",\"InstantAccess\":false,\"Available\":false,\"RemainTime\":38,\"SourceDiskSize\":\"10\",\"RetentionDays\":30,\"SourceDiskType\":\"system\",\"SourceStorageType\":\"disk\",\"Usage\":\"image\",\"LastModifiedTime\":\"2020-08-25T14:18:09Z\",\"Encrypted\":false,\"SnapshotType\":\"all\",\"SourceDiskId\":\"d-bp18um4r4f2fve251\",\"SnapshotName\":\"testSnapshotName\",\"InstantAccessRetentionDays\":30,\"Description\":\"testDescription\",\"SnapshotId\":\"s-bp17441ohwka0yuh4****\",\"ResourceGroupId\":\"rg-bp67acfmxazb4p****\",\"Category\":\"standard\",\"KMSKeyId\":\"0e478b7a-4262-4802-b8cb-00d3fb40****\",\"SnapshotSN\":\"64472-116742336-61976****\",\"ProductCode\":\"jxsc000****\",\"SourceSnapshotId\":\"s-bp67acfmxazb4p4****\",\"SourceRegionId\":\"cn-hangzhou\",\"Tags\":{\"Tag\":[{\"TagValue\":\"TestValue\",\"TagKey\":\"TestKey\"}]}}]}}"
        elif snapshotId == "s-bp17441ohwka0yuh5****" or diskId == "d-bp18um4r4f2fve24100":
            snapshot = "{\"NextToken\":\"caeba0bbb2be03f84eb48b699f0a4883\",\"PageSize\":10,\"PageNumber\":1,\"RequestId\":\"473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E\",\"TotalCount\":1,\"Snapshots\":{\"Snapshot\":[{\"Status\":\"accomplished\",\"CreationTime\":\"2020-08-20T14:52:28Z\",\"Progress\":\"100%\",\"InstantAccess\":false,\"Available\":false,\"RemainTime\":38,\"SourceDiskSize\":\"10\",\"RetentionDays\":30,\"SourceDiskType\":\"system\",\"SourceStorageType\":\"disk\",\"Usage\":\"image\",\"LastModifiedTime\":\"2020-08-25T14:18:09Z\",\"Encrypted\":false,\"SnapshotType\":\"all\",\"SourceDiskId\":\"d-bp18um4r4f2fve24100\",\"SnapshotName\":\"testSnapshotName\",\"InstantAccessRetentionDays\":30,\"Description\":\"testDescription\",\"SnapshotId\":\"s-bp17441ohwka0yuh5****\",\"ResourceGroupId\":\"rg-bp67acfmxazb4p****\",\"Category\":\"standard\",\"KMSKeyId\":\"0e478b7a-4262-4802-b8cb-00d3fb40****\",\"SnapshotSN\":\"64472-116742336-61976****\",\"ProductCode\":\"jxsc000****\",\"SourceSnapshotId\":\"s-bp67acfmxazb4p4****\",\"SourceRegionId\":\"cn-hangzhou\",\"Tags\":{\"Tag\":[{\"TagValue\":\"TestValue\",\"TagKey\":\"TestKey\"}]}}]}}"

        return snapshot

    def create_disk(self, regionId, snapshotId="", instanceId="", diskName="", diskSize=0, diskType="", description="", **kwargs):
        craeteDiskRes = ""
        if snapshotId == "s-bp17441ohwka0yuh1****":
            craeteDiskRes = "{\"DiskId\":\"d-bp131n0q38u3a4zi1\",\"RequestId\":\"473469C7-AA6F-4DC5-B3DB-A3DC0DE3****\",\"OrderId\":\"20413515388****\"}"
        elif snapshotId == "s-bp17441ohwka0yuh2****":
            craeteDiskRes = "{\"DiskId\":\"d-bp131n0q38u3a4zi2\",\"RequestId\":\"473469C7-AA6F-4DC5-B3DB-A3DC0DE3****\",\"OrderId\":\"20413515388****\"}"
        elif snapshotId == "s-bp17441ohwka0yuh3****":
            craeteDiskRes = "{\"DiskId\":\"d-bp131n0q38u3a4zi3\",\"RequestId\":\"473469C7-AA6F-4DC5-B3DB-A3DC0DE3****\",\"OrderId\":\"20413515388****\"}"
        elif snapshotId == "s-bp17441ohwka0yuh4****":
            craeteDiskRes = "{\"DiskId\":\"d-bp131n0q38u3a4zi4\",\"RequestId\":\"473469C7-AA6F-4DC5-B3DB-A3DC0DE3****\",\"OrderId\":\"20413515388****\"}"
        elif snapshotId == "s-bp17441ohwka0yuh5****":
            craeteDiskRes = "{\"DiskId\":\"d-bp131n0q38u3a4zi5\",\"RequestId\":\"473469C7-AA6F-4DC5-B3DB-A3DC0DE3****\",\"OrderId\":\"20413515388****\"}"
        elif snapshotId== "":
            craeteDiskRes = "{\"DiskId\":\"d-bp131n0q38u3a4zi4\",\"RequestId\":\"473469C7-AA6F-4DC5-B3DB-A3DC0DE3****\",\"OrderId\":\"20413515388****\"}"
        return craeteDiskRes

    def attach_disk(self, instance_id, disk_id, bootable=False, delete_with_instance=False, **kwargs):
        result = "{\"RequestId\":\"473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E\"}"
        self._attach = True
        return result

    def detach_disk(self, instance_id, disk_id, delete_with_instance=True, **kwargs):
        result = "{\"RequestId\":\"473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E\"}"
        self._attach = False
        return result

    def delete_snapshot(self, snapshotId, force=True, **kwargs):
        result = "{\"RequestId\":\"473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E\"}"
        self._delete_snapshot = True
        return result

    def delete_disk(self, disk_id, **kwargs):
        result = "{\"RequestId\":\"473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E\"}"
        self._delete_disk = True
        return result

    def stop_instance(self, instance_id):
        result = "{\"RequestId\":\"473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E\"}"
        self._stop_instance = True
        return result

    def start_instance(self, instance_id):
        result = "{\"RequestId\":\"473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E\"}"
        self._stop_instance = False
        return result

    def delete_snapshotgroup(self, regionId, snapshot_group_id):
        result = "{\"RequestId\":\"6EDE885A-FDC1-4FAE-BC44-6EACAEA6CC6E\",\"OperationProgressSet\":{\"OperationProgress\":[{\"ErrorMsg\":\"testErrorMsg\",\"ErrorCode\":\"400\",\"OperationStatus\":\"Success\",\"RelatedItemSet\":{\"RelatedItem\":[{\"Name\":\"SnapshotId\",\"Value\":\"s-j6c9lpuyxo2uxxnx****\"}]}}]}}"
        self._delete_snapshot = True
        return result

